android toolbar 左边的空隙如何取消的办法

来源:互联网 发布:c%2b%2b编程入门 编辑:程序博客网 时间:2024/05/22 11:39
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"                                   xmlns:app="http://schemas.android.com/apk/res-auto"                                   android:id="@+id/maintoolbar"                                   app:theme="@style/ThemeOverlay.AppCompat.ActionBar"                                   app:contentInsetLeft="0dp"                                   app:contentInsetStart="0dp"                                   android:background="@color/green"                                   android:layout_width="match_parent"                                   android:layout_height="wrap_content"                                   android:minHeight="?attr/actionBarSize" >

在toolbar里面添加上这两个属性就可以了
app:contentInsetLeft=”0dp”
app:contentInsetStart=”0dp”

2 0