Android Question Activity.TitleColor

Sanxion

Active Member
Licensed User
Longtime User
Hi All

What is the equivalent of Activity.TitleColor for newer devices? The tool-tip states this will only work for Android 2.* devices.

Thanks
 
It is the same. It works for higher Android OS also. @Erel probably did not have a chance to update the tool tip from way back. He is focusing on the big stuff.
Code: Copy
Activity.TitleColor=Colors.Cyan
 
Upvote 0
It is the same. It works for higher Android OS also. @Erel probably did not have a chance to update the tool tip from way back. He is focusing on the big stuff.
Code: Copy
Activity.TitleColor=Colors.Cyan
Thanks for the response.

This is my code:
Code: Copy
Activity.Title = "Activity Title"
Activity.TitleColor = Colors.Black

I have attached an image, as you can see the Activity Title is still white even though the text says: "Activity Title"
 

Attachments

  • Activity.PNG
    Activity.PNG
    8.4 KB · Views: 765
Last edited:
Upvote 0
as you can see the Activity Title is still white even though the text says: "Activity Title"
Activity.TitleColor refers to the color of the title text, which is black in your case and exactly what it is supposed to be. I think you mean the background of the title. If that is the case, refer to the below link where it uses IN LINE JAVA and the JavaObject library. Make sure the target SDK in manifest editor does not exceed 10, like this: <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="10"/>

https://b4x.com/android/forum/threads/title-color.76452/
 
Upvote 0
Activity.TitleColor refers to the color of the title text, which is black in your case and exactly what it is supposed to be. I think you mean the background of the title. If that is the case, refer to the below link where it uses IN LINE JAVA and the JavaObject library. Make sure the target SDK in manifest editor does not exceed 10, like this: <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="10"/>

https://b4x.com/android/forum/threads/title-color.76452/
Thank-you. I will try it.
 
Upvote 0
Upvote 0
Don't use Android 2.x themes. Your app will look outdated.
You can use CSBuilder to change the title color:
If you read the thread again, you will see that the purpose of the thread is to show the Activity title background color , not the title color. The only way I was able to show it in my answer was using SDK target 10. Could you please offer a better way using a more recent SDK how to use a title background (not title text color).
 
Upvote 0
Upvote 0
Back
Top