設置標高AppBarLayout
時,我的ToolBar
消失。這是佈局。爲AppBarLayout設置標高時,工具欄消失
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="@dimen/appbar_height"
app:elevation="0dp"
android:background="@color/transparent">
<android.support.v7.widget.Toolbar
style="@style/ToolBarStyle"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp"
android:background="@drawable/backgorund_toolbar_tranluscent"
android:minHeight="@dimen/abc_action_bar_default_height_material" />
</android.support.design.widget.AppBarLayout>
我試過app:elevation
這樣的值,如0dp,0.1dp和4dp。這裏發生了什麼事?它是一個支持庫錯誤嗎?我正在使用24.0.0
。
檢查[this](http://stackoverflow.com/q/37778309/437146)發佈 – NightFury
@NightFury謝謝。這解決了它。如果您可以發佈答案,我會將其設置爲已接受。 –