小编Nem*_*nja的帖子

在协调器布局中排列视图

我有问题使我的框架布局低于底部导航抽屉(是的,我把它放在顶部:))。现在框架布局的顶部被 BND 隐藏,因为它像 BND 一样与父顶部对齐,而不是与 BND 底部对齐。

这是代码:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/coordID">

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

    <FrameLayout
        android:id="@+id/fID2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    </FrameLayout>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/dummyFAB"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|bottom"
        android:layout_margin="16dp"
        app:srcCompat="@drawable/ic_settings"
        app:layout_insetEdge="bottom" />

  </android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)

android view coordinator-layout

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

标签 统计

android ×1

coordinator-layout ×1

view ×1