【问题标题】:How to overcome gap between navigation icon and activity label?如何克服导航图标和活动标签之间的差距?
【发布时间】:2016-11-02 11:30:31
【问题描述】:

我想减少这个空间有什么办法吗?

这是我的 style.xml

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="listPreferredItemHeightSmall">40dp</item>
    </style>
    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>

【问题讨论】:

标签: android android-layout toolbar


【解决方案1】:

将这些属性添加到您的工具栏:

app:contentInsetLeft="0dp"  
app:contentInsetStart="0dp"  
app:contentInsetStartWithNavigation="0dp"

【讨论】: