user2702700 user2702700 - 1 year ago 160
Android Question

How to change the height of action bar in android 4.2.2

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.

Answer Source

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"?>
    <style name="Theme.FixedSize" parent="@android:style/Theme.Holo.Light.DarkActionBar">
        <item name="actionBarSize">48dip</item>
        <item name="android:actionBarSize">48dip</item> 

and set this Theme to your Activity:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download