android weight frameLayout和BottomNavigationView 布局分配

匿名 (未验证) 提交于 2019-12-03 00:21:02
<LinearLayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical">     <FrameLayout         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:id="@+id/fl_container"         >      </FrameLayout>      <android.support.design.widget.BottomNavigationView         android:layout_width="match_parent"         android:layout_height="wrap_content"         app:itemIconTint="@color/selector_bottom_item_color"         app:itemTextColor="@color/selector_bottom_item_color"          ></android.support.design.widget.BottomNavigationView>  

</LinearLayout>

将FrameLayout的下列属性改为

     android:layout_height="0dp"         android:layout_weight="1"
之后,那么frameLayout占据BottomNavigationView 适配的GroupView 之外的所有空间。
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!