在下图中,如何删除菜单中图标和项目标题之间的空格?
活动_主_抽屉.xml:
<?xml version="1.0" encoding="utf-8" ?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:icon="@drawable/ic_exit_to_app"
android:id="@+id/logout"
android:title="Logout" />
</menu>
样式.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.LoginButton" />
<style name="AppTheme.NoActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
您可以使用这些值来覆盖these https://github.com/android/platform_frameworks_support/blob/master/design/res/values/dimens.xml#L29你的价值观尺寸.xml:
<dimen name="design_navigation_icon_padding" tools:override="true">10dp</dimen>
不过,打破材料设计准则是不可取的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)