Title and tab background colors

sconlon

Active Member
Licensed User
Longtime User
I am having a problem trying to set the background color of the title bar in app. In the Activity_Create sub I have:

Sub Activity_Create(FirstTime As Boolean)

Dim BGcolor1 As Int : BGcolor1 = Colors.RGB(101,12,27)
Dim FGColor1 As Int : FGcolor1 = Colors.RGB(255,204,102)

Activity.LoadLayout("mainLayout")
Activity.Title = appname
Activity.TitleColor = Textcolor1
Activity.Color = BGcolor1

where BGcolor1 is set to dark red. Also in the Designer I have set the background of mainLayout to dark red. However, the background color of the title bar appears as blue. Should this be set somewhere else?

My second query is in relation to the default color of the tabs in a tabhost view. Again the tabs appear as blue, same as the title background. I tried using setTabGradientDrawable as follows:

TabManager.setTabGradientDrawable(TabHost1, "LEFT_RIGHT", FGcolor1, BGColor1, cornerRadius2)

but the result was not very pretty as the tabs seemed to be merged together without a distinguishing gap between them.

Any help would be appreciated.

Thanks,
Seamus
 

sconlon

Active Member
Licensed User
Longtime User
The attached screen shot shows the blue titlebar at the top and also the tabs issue, the yellow is FGcolor1 and the red is BGcolor1.

Thanks,
Seamus
 

Attachments

  • main.png
    main.png
    27.4 KB · Views: 643
Upvote 0

sconlon

Active Member
Licensed User
Longtime User
Maybe I'm confused here but is the system bar and activity title two different things? If so where is the activity title displayed?

Thanks for the suggestions about replacing the tabhost with buttons and panels, I think that would suit better indeed.
Seamus
 
Upvote 0
Top