Как я могу удалить тень или разделитель из нижней части макета AppBar или панели инструментов? - PullRequest
0 голосов
/ 11 ноября 2019

enter image description here

Я хочу удалить тень или разделитель из нижней части макета AppBar или панели инструментов

Вот мой код xml

высота, actionBarDivider уже пробовал.

<com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:elevation="0dp"
            android:theme="@style/AppTheme.AppBarOverlay">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/colorPrimaryDark"
                app:popupTheme="@style/AppTheme.PopupOverlay" />

 </com.google.android.material.appbar.AppBarLayout>

1 Ответ

1 голос
/ 11 ноября 2019

Установите высоту 0 (ноль) dp (например: android: elevation = "0dp" или app: elevation = "0dp"), как показано ниже:

<com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:elevation="0dp"
            android:theme="@style/AppTheme.AppBarOverlay">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/colorPrimaryDark"
                app:popupTheme="@style/AppTheme.PopupOverlay"
                 />

 </com.google.android.material.appbar.AppBarLayout>
...