God*_*hen 5 android actionbarsherlock
我正在尝试更改<Android 3.0设备上ActionBarSherlock ActionBar选项卡的选项卡文本.
在设备> Android 3.0上,文本只包含两行.在设备<Android 3.0上,文本是单行的,似乎设置为ellipsize:marquee和marqueeRepeatLimit:marquee_forever.
我正在尝试在<Android 3.0设备上更改此设置,以使文本两行.
这是尝试做的事情:
<style name="MyTheme" parent="@style/Theme.Sherlock">
<item name="actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item>
</style>
<style name="MyActionBarTabTextStyle" parent="Widget.Sherlock.ActionBar.TabText">
<item name="android:ellipsize">end</item>
<item name="android:lines">2</item>
<item name="android:textColor">#f00</item>
</style>
Run Code Online (Sandbox Code Playgroud)
该textColor属性是为了确保我甚至做了正确的事情.是的,我是,标签文字是红色的.
但不幸的是,椭圆形设置似乎没有任何影响.
关于如何改变这个的任何想法?
尽管您可能不再需要这个(考虑到这个问题已经存在一年多了),但可能有人通过谷歌搜索登陆这里,并且可能会发现这个答案很有用。
将样式更改为此将使其正常工作:
<style name="MyTheme" parent="@style/Theme.Sherlock">
<item name="actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item>
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item>
</style>
<style name="MyActionBarTabTextStyle" parent="Widget.Sherlock.ActionBar.TabText">
<item name="android:ellipsize">end</item>
<item name="android:lines">2</item>
<item name="android:textColor">#f00</item>
</style>
Run Code Online (Sandbox Code Playgroud)
android:actionBarTabTextStyleActionBar代表HC+ 的默认 TextStyleactionBarTabTextStyle和ActionBarSherlock.
| 归档时间: |
|
| 查看次数: |
992 次 |
| 最近记录: |