I've implemented BottomNavigationView (BNV). My BNV always stay on top of other view, how can I make it stay under other view?
This is my View
<RelativeLayout xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottomNavi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_bottom_navi"
app:itemBackground="@drawable/selector_navi_bottom"
app:itemIconTint="@color/colorPrimary"
app:itemTextColor="@color/colorPrimary"
app:menu="@menu/bottom_navigation" />
<FrameLayout
android:id="@+id/frm_content_full"
android:layout_width="match_parent"
android:background="@color/colorPrimaryDark"
android:layout_height="match_parent" />
</RelativeLayout>
This is what it shown.
Thanks.
EDIT 1: The space below BNV is for AdView, my question is about when I use above code, screen will become Blue, BNV will be hidden.
Try this xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/frm_content_full"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linear_bottombar"
android:background="@color/colorPrimaryDark" />
<LinearLayout
android:id="@+id/linear_bottombar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottomNavi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_bottom_navi"
app:itemBackground="@drawable/selector_navi_bottom"
app:itemIconTint="@color/colorPrimary"
app:itemTextColor="@color/colorPrimary"
app:menu="@menu/bottom_navigation" />
<!--your adview-->
</LinearLayout>
</RelativeLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With