android - Android 导航抽屉在顶部添加了一个带有较暗阴影的空白空间
问题描述
我正在尝试显示 make ui,其中导航抽屉在工具栏下方显示类似这样的内容
我希望导航栏显示在工具栏下,所以我在导航视图中添加了marign。
但实际上它就像这个输出屏幕一样出来 ,它在顶部添加了 16 dp 的填充/边距,顶部有较深的阴影。我试过了,但它不起作用。有人可以帮忙吗?
appcompat 版本是 28.0.0 谁能帮忙
<android.support.v4.widget.DrawerLayout
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:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"
android:background="@color/secondaryColor">
<include
android:id="@+id/include_layout_home_screen"
layout="@layout/activity_home_screen"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_drawer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:background="@color/primaryColor"
app:itemTextColor="@color/colorLabelGreyed"
app:itemIconTint="@color/secondaryColor"
app:menu="@menu/activity_naviagtion_drawer_drawer"
android:layout_marginTop="84dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom"
android:paddingBottom="24dp"
android:paddingLeft="16dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/facebook_btn"
android:layout_gravity="center_vertical"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/ic_facebook_icon"
android:paddingRight="10dp"/>
<android.support.v7.widget.AppCompatImageView
android:id="@+id/instagram_btn"
android:layout_gravity="center_vertical"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/ic_instagram_icon"
android:paddingRight="10dp"/>
<android.support.v7.widget.AppCompatImageView
android:id="@+id/twitter_btn"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_vertical"
android:paddingRight="10dp"
android:src="@drawable/ic_twitter_icon" />
</LinearLayout>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:focusableInTouchMode="true">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:theme="@style/AppTheme.AppBarOverlay"
android:background="@color/primaryDarkColor"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
layout="@layout/app_toolbar"/>
</android.support.design.widget.AppBarLayout>
解决方案
推荐阅读
- c# - 将子项添加到嵌套的 StackPanel
- google-cloud-platform - 如何在 Google Cloud SQL 中获取按需备份的大小?
- flutter - Flutter:抛出异常时获取完整的堆栈跟踪?
- python - 在某些网络链接中为空时无法重新定义变量(Python Selenium)
- java - 代理时 Weblogic JMX MBean 方法的签名错误
- flutter - MissingPluginException(在通道 plugins.flutter.io/path_provider 上找不到方法 getTemporaryDirectory 的实现)
- docker - 无法在 Airflow DockerOperator 中运行脚本
- facebook - Faceook 在像素/转换 API 与聚合事件测量下添加事件以跟踪 IOS 使用
- jenkins - Jenkins Pipeline Matrix 不会等到所有分支都完成
- javascript - 我如何在反应中创建一个弹出窗口