How Do I Change the Title Bar Color in Android?
Contents

How do I change the color of my header on android?

xml in your AppTheme android:colorPrimary property is responsible for toolbar color change this to your color. First you have to change in manifest where you have declared the activity . Change app theme style to noActionBar. Now come to your main activity and initialize the new toolbar and set the color in it.

How do I change the title text bar in android?

Method 2: By Setting TextFont Programmatically

First, add a font file in the src/main/assets/fonts/ of your project. Then create variables for Toolbar and text title and call the method findViewById(). Create a new Typeface from the specified font data. And at last setTypeface in text title.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest