Android Question TabStrip indicator not showing

ilan

Expert
Licensed User
Longtime User
hi

1, when i set background color to the tabstrip labels (page titles) i dont see anymore the indicator.

2, can i set the tabstrip so the top page title that is focused will always be at the center?

3, i would also like to know how to set the background color of the top of the screen where the clock is shown so it has the same background color as the tabstrip labels (do i have to start a new thread for this question?)

(sample project incl.)

thanx, ilan
 

Attachments

  • My Salary New.zip
    32.4 KB · Views: 327

ilan

Expert
Licensed User
Longtime User
Thank you for your help erel.

2, yes i would like to have januar or december also centered. Is it possible?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
I don't think that it is possible.

i think it is :) (see attached project)

1. The label color should be semi-transparent:
B4X:
lbl.Color = Colors.ARGB(150, 52,152,219)

sorry but i still dont see the indicator even if i set the back color to semi-transparent
 

Attachments

  • My Salary New.zip
    33.2 KB · Views: 342
Upvote 0

ilan

Expert
Licensed User
Longtime User
Nice solution. The white color disappears. Change it to any other color and you will see it.

But i need white :D

Never mind, as u can see in the project the selected page title is white and all other have alpha so i think its good enough to see what page has focus and i can give up the indicator.

Thanx erel
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
ok after working a little bit on my project i noticed that you cannot load any number of pages to a tabstrip. loading about 20 pages will give me a "out of memory" crash.

i had to to find a way how to show a tabstrip that contains all month of the year where you can scroll from 1 month to the other.
so the current month is in the center and the next month is on the right and the previous month is on the left.

actually i only need 3 pages but there is no way to scroll and add new pages to the tabstrip and still get the nice sliding effect right? o_O

well, i found a nice work around for my issue and i want to share it with you.

so what i do is i create 5 pages (3 where enough but when i scroll right/left i also show -2/+2 month, this looks better in my opinion)
so what i do is very simple scrolling to the left will call after x ms a sub that will scroll back to page nr 2 and reload the title lbl.

like this i only have 5 pages but it looks like i have unlimited pages. ;)

have a look
 

Attachments

  • My Salary New.zip
    57.2 KB · Views: 342
Upvote 0
Top