0

I'm newbie in Android so this might be the easy question for you guys but I'm stuck. I want to remove shadow of Toolbar so I followed thread how to remove shadow below actionbar with AppCompat.Light.NoActionBar? and using app:elevation="0dp" I was able to remove the shadow of Toolbar but that change the current height of Toolbar as displayed in [Image 2]. I want maintain the same exact size of Toolbar but without shadow. I also used android:fitsSystemWindows="true" from thread Android toolbar height difference but it move Profile text on top and also create white line at bottom [Image 3] .

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:theme="@style/AppTheme.AppBarOverlay"
    app:elevation="0dp"
    android:fitsSystemWindows="true">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay"
        android:minHeight="?attr/actionBarSize"/>

</android.support.design.widget.AppBarLayout>

enter image description here


enter image description here
enter image description here

I guess we can use android:layout_height:Xdp or android:layout_height:Xpx but is this the last option or there is default way to do this.

Community
  • 1
  • 1
Vicky Thakor
  • 3,847
  • 7
  • 42
  • 67

0 Answers0