Reputation: 639
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.
Upvotes: 3
Views: 10953
Reputation: 1
You only need to add item name="actionBarSize" 60dp item inside styles.xml.
Upvotes: 0
Reputation: 11
Or just directly add the follow line inside the styles.xml:
<item name="android:actionBarSize">35dp</item>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textAllCaps">false</item>
<item name="android:actionBarSize">35dp</item>
</style>
Upvotes: 1
Reputation: 6112
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:
android:theme="@style/Theme.FixedSize"
Upvotes: 12