[英]Changing layout of navigation drawer icon
( http://i.imgur.com/m5uukSr.png ) ( http://i.imgur.com/m5uukSr.png )
How can I format the navigation drawer icon (seen on the left) so I can move it to the right or add padding? 如何格式化导航抽屉图标(在左侧看到),以便可以将其向右移动或添加填充?
I've tried changing the format within the styles; 我尝试过更改样式中的格式; however, that doesn't seem to work.
但是,这似乎不起作用。
ActionBarDrawerToggle(<Activity>, <DrawerLayout>, R.drawable.main_icon, 0, 0);
drawable/main_icon.xml
: drawable/main_icon.xml
:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/your_icon" android:left="10dp" />
</layer-list>
Then adjust the margins android:left
, android:right
etc. 然后调整边距
android:left
, android:right
等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.