java - Remove android.widget.Toolbar shadow -


using api21+ toolbar:

// toolbar toolbar toolbar = new toolbar(this); toolbar.showoverflowmenu(); 

would remove shadow completely. setelevation(0) doesn't since getelevation() returns 0.

there material design reference:

https://material.io/guidelines/layout/structure.html#structure-toolbars

there develop reference:

https://developer.android.com/reference/android/widget/toolbar.html

but don't see info related shadow. toolbar

question: how remove/hide toolbar shadow completely?

use app:elevation="0dp" instead of android:elevation on toolbar. if not work, put toolbar inside of appbarlayout , set app:elevation="0dp":

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

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -