In my project i use the tabhost object and add some tabs to it, using the code.
Works fine, the tabhost object is created and the tabs are added. However the layout looks not like i expected: the tabobject and it's tabs are orange.
It looks like this but worser and under the tabs which are not selected there is an orange line.
I would like to have a professional tabhost layout, like this:
Or this:
I tried to use the Reflection library and it changes the layout but unfortunately not like the examples like above.
In the first code excerpt it has LoadTabWithBmp or similar, which you should use. I would also suggest looking at the code example on the bottom of the first post as well.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
[B] Dim bmp1, bmp2 As Bitmap
bmp1 = LoadBitmap(File.DirAssets, "ic.png")
bmp2 = LoadBitmap(File.DirAssets, "ic_selected.png")[/B]
[B] TabHost1.AddTabWithIcon ("Name", bmp1, bmp2, "page1") 'load the layout file of each page[/B]
TabHost1.AddTab("Color", "page2")
TabHost1.AddTab("Animal", "page3")
End Sub
If you still can't find it - look on the Designer, under Tabhost, let me know and I will look at it for you.. The example Tabhost has the background in grey.. (linked from first link above)
Ok, now i downloaded your app (the motorsport calendar) and even in your app the tabs are orange.
I also use Runkeeper on my device and their tabs are customized but how?