-3

Q: how to make custom actionbartoggle button in android? I want to make custom actionbartoggle button which hamburger button shown at right top in actionbar.

I want to resize it and change color through programmatically, not in xml. I need to make custom toggle button.

Manmohan
  • 410
  • 4
  • 13

1 Answers1

0

Try this :

<style name="AppTheme.AppBarOverlay" parent="@android:style/Theme.Holo.Light.DarkActionBar">
        <item name="android:actionBarSize">64dp</item>
        <item name="actionBarSize">64dp</item>
</style> 

mdpi - 32 dp = 32 px

hdpi - 32 dp * 1.5 = 48 px

xxhdpi - 32 dp * 2 = 64 px

note: changes the size of the entire Action Bar and all its contents, not just the icon though.

you can change color using

<item name="android:actionBarItemBackground">@color/colorAccent</item>

inside theme

image

images for 32 dp and 64 dp enter image description here

Charuක
  • 12,953
  • 5
  • 50
  • 88