Android API 级别 <4 上缺少 TabSpec.setIndicator(View view) 的解决方法
我需要将自定义视图用于 TabHost 的指示器。对于 Android API 级别 >=4 没有问题,但在 Android API 级别 <4 中此方法未实现。有什么建议吗?
我正在考虑实现此方法,但不幸的是 TabHost 类不允许更改,因为所有属性均为私有且不受保护。
谢谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用反射:
I suggest use reflection: