【发布时间】:2020-11-04 15:37:53
【问题描述】:
在这张图片中你可以看到工具栏的阴影,我想去掉这个阴影。
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Theme.AIT.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="#2398f4"
app:popupTheme="@style/Theme.AIT.PopupOverlay"
app:elevation="0dp"/>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_main" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
这是工具栏的xml文件。另外请告诉我如何将这个主页标题设置为中心。
【问题讨论】:
-
设置高度为 0dp
-
不工作的兄弟
-
不工作@tyczj
-
@Ali Eid 我添加了 xml 文件,您可以查看