【发布时间】:2020-06-12 07:56:46
【问题描述】:
BottomNavigationBar 有一个问题。屏幕边缘莫名其妙的边距出现在屏幕上。
这是我的 XML 代码:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#FBCEB5">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/mainNavigationBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:itemBackground="@color/colorPrimary"
app:menu="@menu/main_bottom_bar"
app:itemIconTint="@android:color/white"
app:itemTextColor="@android:color/white"/>
</RelativeLayout>
我怎样才能穿上所有的父母宽度?请帮忙)
【问题讨论】: