小编ble*_*end的帖子

将 design.widget.BottomNavigationView 放置到相对布局的底部

我一直在努力将底部导航视图放置到底部。它没有定位到底部。底部导航视图放置在带有按钮的相对布局内。这是文件中的xml代码

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">



    <android.support.design.widget.BottomNavigationView
        android:id="@+id/navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="?android:attr/windowBackground"
        app:menu="@menu/navigation" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

以上是我的代码的典型展示,但底部导航视图未与底部对齐。考虑到上述片段,请问如何将底部导航视图放置在我的活动的底部

xml android android-layout

1
推荐指数
1
解决办法
1999
查看次数

标签 统计

android ×1

android-layout ×1

xml ×1