使用 TabWidget.setDividerDrawable()?
有人使用 TabWidget.setDivider()
取得过成功吗?我不确定它是否符合我的假设:让您有机会提供在每个选项卡实例之间绘制的可绘制对象?
mTabHost.getTabWidget().setDividerDrawable(R.drawable.dividerDrawable);
这似乎没有做任何事情。查看 android 项目中的选项卡可绘制资源表明,分隔线实际上是绘制到选项卡图像本身中的 - 这应该有效还是不支持?
Has anyone had any success with TabWidget.setDivider()
? I'm not sure it does what I'm assuming: gives you a chance to supply a drawable to be drawn between each tab instance?
mTabHost.getTabWidget().setDividerDrawable(R.drawable.dividerDrawable);
this does not appear to do anything. Looking at the tab drawable resources in the android project shows that the dividers are actually drawn into the tab images themselves - is this supposed to work or is it not supported?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在设置选项卡的内容之前调用它。否则它会崩溃。
类似的答案在这里
Call that before you set the content of the tabs.Or It would crash.
similar answer is here