我在尝试使我的 ViewPager 选项卡文本变为小写大写,但它不起作用,
我搜索并检查了与此相关的其他帖子,尝试了他们的解决方案,但仍然不起作用
<style name="MyCustomTabLayout" parent="Widget.Design.TabLayout">
<item name="tabTextAppearance">@style/MyCustomTextAppearance</item>
</style>
<style name="MyCustomTextAppearance" parent="TextAppearance.Design.Tab">
<item name="textAllCaps">false</item>
</style>
ViewPager 选项卡布局
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
app:textAllCaps="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MyCustomTabLayout" />
请问有任何确认的工作解决方案吗?
thanks.
虽然有点晚了,但希望对某人有所帮助。
如果您使用支持设计,那么您只需在选项卡布局中添加下面提到的行即可获得预期结果。
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)