如何更改操作栏的安卓4.2.2的高度 [英] How to change the height of action bar in android 4.2.2
本文介绍了如何更改操作栏的安卓4.2.2的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能改变操作栏的高度?我曾尝试与ActionBar.setCustomView(视图,的LayoutParams),但不能改变高度。 请suggest.Any帮助将AP preciated。
Is it possible to change the height of action bar ? I have tried with ActionBar.setCustomView(view, layoutparams) but couldn't change the height. Please suggest.Any help will be appreciated.
推荐答案
要设置动作条的高度,你可以创建一个新文件的的themes.xml 在 RES /值
文件夹:
To set the height of ActionBar you can create a new file themes.xml in your res/values
folder:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.FixedSize" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="actionBarSize">48dip</item>
<item name="android:actionBarSize">48dip</item>
</style>
</resources>
和设置该主题为您的活动:
and set this Theme to your Activity:
安卓主题=@风格/ Theme.FixedSize
android:theme="@style/Theme.FixedSize"
这篇关于如何更改操作栏的安卓4.2.2的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文