【发布时间】:2018-08-03 18:14:27
【问题描述】:
我是第一次使用 NavigationBar 小部件,我无法将 FrameLayout 设置为不在 NavigationBar 后面。 我已经尝试了所有方法:在 RelativeLayout (NavigationBar 消失) 中进行设置,我在 StackOverflow 周围找到的所有设置,但我没有成功。
这是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="mypackage.myActivity"
android:background="@color/background_activities">
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
app:layout_constraintTop_toTopOf="parent"
android:fitsSystemWindows="true"
>
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/color_NavigationBar"
app:itemIconTint="@color/white"
app:itemTextColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation" />
</android.support.constraint.ConstraintLayout>
希望有人能帮助我找出我犯错的地方。 非常感谢
【问题讨论】:
标签: android xml android-fragments fragment