我想改变动作条图标大小 [英] I want to change actionbar icon size
本文介绍了我想改变动作条图标大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用这个code
I tried to use this code
<item
android:id="@+id/male_button"
android:layout_width="46dp"
android:layout_height="56dp"
android:layout_gravity="right"
android:icon="@drawable/icon_male"
android:showAsAction="always"
android:title="i"/>
<item
android:id="@+id/female_button"
android:layout_width="46dp"
android:layout_height="56dp"
android:layout_gravity="right"
android:icon="@drawable/icon_female"
android:showAsAction="always"
android:title="i"/>
和我改变了机器人:layout_width =46dp到Android:layout_width =30dp 但我仍然有相同的大小 所需的图像是
and I changed android:layout_width="46dp" to android:layout_width="30dp" but I still have the same size the desired image is
和我现在有这个
我如何更改图标是一样的第一张照片?
How can I change the icons to be as the first picture ?
推荐答案
看这回答。你必须设置动作条
尺寸在应用程序或活动的主题。然后,你应该能够图标的高度设置为match_parent
。
Look at this answer. You have to set the ActionBar
size in the app or activity's theme. Then, you should be able to set the height of the icons to "match_parent"
.
这篇关于我想改变动作条图标大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文