I am getting a gap between toolbar and hamburger icon.Even i have added app:contentInsetLeft,app:contentInsetStart, app:contentInsetStartWithNavigation ,still i am getting the gap.
I added the following code to toolbar
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="#fff">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hi, Ajay Jayendran"
android:textColor="#123"
android:textSize="20sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Good Morning"
android:textColor="#111"
android:layout_below="@+id/toolbar_title"
/>
</RelativeLayout>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
I using own hamburger icon for navigation drawer. for that, I used following code,
toggle.setDrawerIndicatorEnabled(false);
toggle.setHomeAsUpIndicator(R.drawable.navigation_icon);
Here, this is a screenshot that gap between icon and toolbar
Does anybody know how to reduce this space between hamburger icon and toolbar.?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…