How Can I Painlessly Change My App Title Text Color?
Solution 1:
This should work. Go to your styles.xml
s file.
<stylename="TextAppearance.AppCompat.Widget.ActionBar.Title"parent="@style/TextAppearance.AppCompat"><itemname="android:textSize">TEXT_SIZE_HERE</item><itemname="android:textColor">COLOR_RESOURCE_HERE</item><itemname="android:fontFamily">FONT_HERE</item></style>
Edit accordingly. Video tutorial here [https://www.youtube.com/watch?v=510WE8CmiXI][1]
Solution 2:
I found the solution for you.
Go to styles.xml in res->values and in your theme add one item like this:
<item name="titleTextColor">@color/yourColorTitle</item>
Now you just have to add the desired color in the colors.xml resource file in res->values->colors.xml like this:
<colorname="yourColorTitle">#000000</color>
Solution 3:
Go into styles.xml and inside style AppTheme add
<item name="android:textColorPrimary">#b5b5b5</item>
where #b5b5b5 is grey color. You can insert any color you want.
Complete code looks like this (if someone can't find AppTheme):
<stylename="AppTheme"parent="Theme.AppCompat.Light.DarkActionBar"><!-- Customize your theme here. --><itemname="colorPrimary">@color/colorPrimary</item><itemname="colorPrimaryDark">@color/colorPrimaryDark</item><itemname="colorAccent">@color/colorAccent</item><itemname="android:textColorPrimary">#b5b5b5</item></style>
Solution 4:
In your XML file, for the TextView element, add the android:textColor
attribute, with the choice of your color as its value.
<TextViewandroid:id..android:layout_width..android:layout_height..android:text=..android:textColor="#D3D3D3"
/>
Solution 5:
For this, you need to find the AnroidManifest.xml
file.
Using your IDE navigate to app -> src -> main -> AnroidManifest.xml
Option 1: If you're in android studio go inside AndroidManifest.xml
and double click on android:label="@string/app_name"
and it will take you to where you can change the value to whatever you want
Option2: Directly go to app -> src -> main -> res -> values -> strings.xml
and change the name to whatever you want.
NOTE: Please note that it is not recommended to hard code the value of the app name like android:label="HARDCODED name"
as this will break the app in case you want to include features like a translation.
Post a Comment for "How Can I Painlessly Change My App Title Text Color?"