Reputation: 6691
I want to increase width of Navigation drawer icon and add left and right padding to it. Any idea how to do it?
Thanks
Upvotes: 1
Views: 2358
Reputation: 11999
You can do it using the styles:
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">#FE1B56</item>
<item name="barSize">20dp</item>
<!--<item name="thickness">3dp</item>-->
</style>
Add this in your parent theme
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
Upvotes: 1
Reputation: 1568
I also wanted the icon to be wider, so I used Gimp (image editor) to make it wider (just added a few more pixels of the grey lines and extra transparency to the right). The Action Bar displays the icon appropriately and moves the other elements over to fit (like the action bar title). I've provided the image below in case you want to use it:
Upvotes: 0
Reputation: 321
For padding you can use:
ImageView view = (ImageView)findViewById(android.R.id.home);
view.setPadding(left, top, right, bottom);
Regarding the Icon width have you tried using a larger icon?
Upvotes: 1