Android 如何更改API 14及以上版本中的ActionBar选项卡样式
我正在尝试使用ViewPager视图在顶部安装5个选项卡。我需要这5个标签来适应屏幕宽度。它没有,所以我可以减小文本大小使其适合,但是文本太小了。因此,现在我尝试删除每个选项卡的一些填充,如下所示:Android 如何更改API 14及以上版本中的ActionBar选项卡样式,android,android-actionbar-compat,Android,Android Actionbar Compat,我正在尝试使用ViewPager视图在顶部安装5个选项卡。我需要这5个标签来适应屏幕宽度。它没有,所以我可以减小文本大小使其适合,但是文本太小了。因此,现在我尝试删除每个选项卡的一些填充,如下所示: <style name="CustomActionBarTheme" parent="Theme.AppCompat.Light"> <item name="android:actionBarTabTextStyle">@style/MyActionBarTextTh
<style name="CustomActionBarTheme" parent="Theme.AppCompat.Light">
<item name="android:actionBarTabTextStyle">@style/MyActionBarTextTheme</item>
<!-- <item name="android:actionBarStyle">@style/MyActionBarTheme</item> -->
</style>
<style name="MyActionBarTheme" parent="Widget.AppCompat.Light.Base.ActionBar.TabView">
<item name="android:padding">0dp</item>
</style>
<style name="MyActionBarTextTheme" parent="Widget.AppCompat.Light.ActionBar.TabText">
<item name="android:textSize">10sp</item>
</style>
@style/MyActionBarTextTheme
0dp
10便士
除非什么都没发生。事实上,标签完全消失了。我应该做些更具体的事情吗?谢谢