我已经使用actionbar(android native)几天了(jellybean 4.2)。
我尝试通过在 style.xml 中添加以下行来更改操作栏的高度:
100dip
它在横向模式下工作正常,但在方向模式下不起作用。
在定向模式下,其高度没有改变。
您只需创建高度尺寸ActionBar
在纵向和横向模式下:
值/dimens.xml:
<resources>
<!-- dimension for the portrait ActionBar -->
<dimen name="ab_height">100dp</dimen>
</resources>
价值观土地/dimens.xml:
<resources>
<!-- dimension for the landscape ActionBar -->
<dimen name="ab_height">120dp</dimen>
</resources>
现在您可以像这样使用这些尺寸:
<style [...]>
<item name="android:actionBarSize">@dimen/ab_height</item>
</style>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)