Scrollable tabhost in android
I have made a scrollable tabhost in android. It has around 5 tabs. Adding new tabs shrin开发者_StackOverflow社区k the previous ones so that it fits in the entire screen.. it adopts to scroll only in extreme cases like having about 6+ tabs. Is there a method to specify the number of tabs visible at a time? I would like that only 3 of them be visible at a time so that each of them have good enough width.
Specifying tabHost.getTabWidget().getChildAt(position).getLayoutParams().width
did not helpFor just tabs.. just keep check on no of tabs using variable. Now as per the variables value add that many no of tabs to your activity.
精彩评论