Closed HitaoLin closed 5 months ago
TabLayout.setCustomView()的参数是在代码中动态创建的么?
通过inflate获取view后,tablayout.setCustomView(view)
通过inflate获取view后,tablayout.setCustomView(view)
1.使用上边的selector文件在其他控件也无法换肤(使用了button进行修改textcolor) 2.打印出来是:factory2 = org.alee.component.skin.factory2.ThemeSkinFactory2@ae1a16b
1.使用上边的selector文件在其他控件也无法换肤(使用了button进行修改textcolor) 2.打印出来是:factory2 = org.alee.component.skin.factory2.ThemeSkinFactory2@ae1a16b
资源在其他控件上也无法换肤,说明资源适配有问题,检查一下对应的皮肤包下是否有同名selector
有同名的selector,把selector移到res/color就可以了
通过TabLayout.setCustomView()设置Tab的自定义view,自定义view是使用xml实现,TextView的textColor是使用selector实现,在其他皮肤下也添加了selector文件和color,切换皮肤textColor没有切换。