0

I've decompiled the WhatsApp.apk and I want to change the height of the action-bar. WhatsApp uses Action-Bar-Sherlock, but when I change the value for the actionBarSize, it doesnt change something. In Eclipse the Text inside the Action-Bar gets bigger, but the actionbar itself stays on the same size. When i re-compile it to the APK and install it on my HTC One (4.7" 1080x1920) it doesnt even change the text-size.

Did I miss something? How can I change the height of the action bar?

ADT - Design preview

Postback
  • 619
  • 2
  • 9
  • 27

2 Answers2

1

Create style like this-

<style name="Theme.MyAppTheme" parent="Theme.Sherlock.Light">
       <item name="android:actionBarStyle">@style/Theme.MyAppTheme.ActionBar</item>
       <item name="actionBarStyle">@style/Theme.MyAppTheme.ActionBar</item>        
</style>

<style name="Theme.MyAppTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
       <item name="android:background">#222222</item>
       <item name = "background">#222222</item> 
       <item name="android:height">64dip</item>
       <item name="height">64dip</item>
       <item name="android:titleTextStyle">@style/Theme.MyAppTheme.ActionBar.TitleTextStyle</item>
       <item name="titleTextStyle">@style/Theme.MyAppTheme.ActionBar.TitleTextStyle</item>
</style>

<style name="Theme.MyAppTheme.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
        <item name="android:textColor">#fff</item>
        <item name="textColor">#fff</item>
        <item name="android:textStyle">bold</item>
        <item name="textStyle">bold</item>
        <item name="android:textSize">32sp</item>
        <item name="textSize">32sp</item>
</style>

Change height according to your requirement.

And In manifest use android:theme="@style/Theme.MyAppTheme"

Kanwaljit Singh
  • 4,339
  • 2
  • 18
  • 21
  • Doesn't seem to work. It's very strange because the actionbar doesnt resize, but the text inside it – Postback Apr 11 '14 at 11:17
  • what is minimum sdk version you are using in android manifest? – Kanwaljit Singh Apr 11 '14 at 11:43
  • It is set to 1, but I just need support for 19 (4.4) – Postback Apr 11 '14 at 13:52
  • minSdkVersion is 7 required. So change it. – Kanwaljit Singh Apr 12 '14 at 04:26
  • still the height doesnt change. It doesnt even change in the preview-window from eclipse(Android-Tools). Isn't there a window where i can change these settings over a GUI? Like the normal gui-editor where i can put in the linear-layouts, etc... Somehow i guess the values got overwritten, but i don't know where – Postback Apr 14 '14 at 06:03
  • No you can only change this with the help of style. But you can see changes in layout file. In my case I am using app compact and I can see customize action bar. Dont know about sherlock. – Kanwaljit Singh Apr 14 '14 at 07:13
0

Try to use this one:

<style name="Theme.white_style" parent="@android:style/Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarSize">55dp</item>
    <item name="actionBarSize">55dp</item>
</style>
user3506595
  • 129
  • 11