如何克服导航图标和活动标签之间的差距?

时间:2016-11-02 11:30:31

标签: android android-layout toolbar

我想减少这个空间有没有办法做到这一点?Thanks in advanced.

这是我的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>

1 个答案:

答案 0 :(得分:0)

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

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