I would like to have a big action bar. So I am resizing the action bar in the style, and now I am looking for resizing the icon and adding text.
Here is my style:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <item name="android:textSize">22sp</item> <item name="android:actionBarSize">100dp</item> <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item> <item name="android:actionButtonStyle">@style/MyActionButtonStyle</item> </style> <style name="MyActionButtonStyle" parent="android:style/Widget.ActionButton"> <item name="android:layout_width">fill_parent</item> </style> <style name="MyActionBarTabText" parent="android:style/Widget.Holo.ActionBar.TabText"> <item name="android:textColor">@color/white</item> <item name="android:textSize">25dp</item> </style>
And my menu for actionBar (menu.xml):
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/app_setting" android:title="@string/app_setting" android:layout_width="match_parent" android:layout_height="match_parent" android:icon="@drawable/ic_setting" android:showAsAction="ifRoom" /> </menu>
And In the main class:
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu, menu); return true; }
In addition, I tried a few questions, but I could not get it to work.
I want to resize the action bar icon
How to resize the actionBar icon?
source share