使用API21+的Toolbar
:
// Toolbar
Toolbar toolbar = new Toolbar(this);
toolbar.showOverflowMenu();
想要完全移除其阴影,setElevation(0)
不起作用,因为 getElevation()
已经返回了 0
。有Material Design参考:https://material.io/guidelines/layout/structure.html#structure-toolbars 和开发参考:https://developer.android.com/reference/android/widget/Toolbar.html,但我没有看到任何与阴影相关的信息。问题是:如何完全移除或隐藏Toolbar
的阴影?
app:elevation="0dp"
吗?请注意使用app:
前缀。 - ramin eftekhari