开发者

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 help


For 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜