When the application is installed: elevation = "0dp", then hamburgermenu is not displayed on the toolbar

Hi, I want to remove the bottom shadow of the toolbar in order to use the heights property. Currently my code

<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/transparent"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> </android.support.design.widget.AppBarLayout> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent" /> </android.support.design.widget.CoordinatorLayout> 

and output: -

enter image description here

here i don't want the shadow below so i set

  app:elevation="0dp" 

in AppBarLayout, then it removes the shadow, but HamburgerMenu is gone. The new output is as follows: enter image description here

Can someone tell me how to remove the shadow without hiding / disappearing HamburgerMenu.

+7
android toolbar android-appbarlayout hamburger-menu
Jan 30 '17 at 8:03
source share
1 answer

try the following:

  <android.support.design.widget.AppBarLayout android:id="@+id/appBar" android:layout_width="match_parent" android:layout_height="wrap_content" app:elevation="0dp"> ... </android.support.design.widget.AppBarLayout> 

then in your work;

 findViewById(R.id.appBar).bringToFront(); 
+8
Jan 30 '17 at 8:10
source share
— -



All Articles