Home > Mobile >  Will the outermost RelativeLayout replace LinearLayout navigation bar at the bottom of the disappear
Will the outermost RelativeLayout replace LinearLayout navigation bar at the bottom of the disappear

Time:10-06

The outermost use RelativeLayout the whole interface is normal, but into LinearLayout, at the bottom of the navigation bar, will not display is excuse me this why?

The attached code is as follows:
<? The XML version="1.0" encoding="utf-8"?>
Android: layout_width="match_parent"
Android: layout_height="wrap_content"
Android: orientation="vertical" & gt;
Android: layout_width="fill_parent"
Android: layout_height="fill_parent"
Android: background="@ android: color/white"
Android: orientation="vertical" & gt;
<frameLayout
The android: id="@ + id/main_body"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
Android: background="@ android: color/white/& gt;

The android: id="@ + id/main_bottom_bar"
Android: layout_width="match_parent"
Android: layout_height="55 dp"
Android: layout_alignParentBottom="true"
Android: background="# F2F2F2"
The android: orientation="horizontal" & gt;
The android: id="@ + id/bottom_bar_course_btn"
Android: layout_width="0 dp"
Android: layout_height="fill_parent"
Android: layout_weight="1" & gt;
The android: id="@ + id/bottom_bar_text_course"
Android: layout_width="fill_parent"
Android: layout_height="wrap_content"
Android: layout_alignParentBottom="true"
Android: layout_centerHorizontal="true"
Android: layout_marginBottom="3 dp"
Android: gravity="center"
Android: singleLine="true"
Android: text="course"
Android: textColor="# 666666"
Android: textSize="14 sp/& gt;"
The android: id="@ + id/bottom_bar_image_course"
Android: layout_width="27 dp"
Android: layout_height="27 dp"
Android: layout_above="@ id/bottom_bar_text_course"
Android: layout_alignParentTop="true"
Android: layout_centerHorizontal="true"
Android: layout_marginTop="3 dp"
The android: SRC="https://bbs.csdn.net/topics/@drawable/main_course_icon"/& gt;

The android: id="@ + id/bottom_bar_exercises_btn"
Android: layout_width="0 dp"
Android: layout_height="fill_parent"
Android: layout_weight="1" & gt;
The android: id="@ + id/bottom_bar_text_exercises"
Android: layout_width="fill_parent"
Android: layout_height="wrap_content"
Android: layout_alignParentBottom="true"
Android: layout_centerHorizontal="true"
Android: layout_marginBottom="3 dp"
Android: gravity="center"
Android: singleLine="true"
Android: text="problem sets"
Android: textColor="# 666666"
Android: textSize="14 sp/& gt;"
The android: id="@ + id/bottom_bar_image_exercises"
Android: layout_width="27 dp"
Android: layout_height="27 dp"
Android: layout_above="@ id/bottom_bar_text_exercises"
Android: layout_alignParentTop="true"
Android: layout_centerHorizontal="true"
Android: layout_marginTop="3 dp"
The android: SRC="https://bbs.csdn.net/topics/@drawable/main_exercises_icon"/& gt;

The android: id="@ + id/bottom_bar_myinfo_btn"
Android: layout_width="0 dp"
Android: layout_height="fill_parent"
Android: layout_weight="1" & gt;
The android: id="@ + id/bottom_bar_text_myinfo"
Android: layout_width="fill_parent"
Android: layout_height="wrap_content"
Android: layout_alignParentBottom="true"
Android: layout_centerHorizontal="true"
Android: layout_marginBottom="3 dp"
Android: gravity="center"
Android: singleLine="true"
Android: text="I"
Android: textColor="# 666666"
Android: textSize="14 sp/& gt;"
The android: id="@ + id/bottom_bar_image_myinfo"
Android: layout_width="27 dp"
Android: layout_height="27 dp"
Android: layout_above="@ id/bottom_bar_text_myinfo"
Android: layout_alignParentTop="true"
Android: layout_centerHorizontal="true"
Android: layout_marginTop="3 dp"
The android: SRC="https://bbs.csdn.net/topics/@drawable/main_my_icon"/& gt;


CodePudding user response:

Your content is fill_parent interface height, if the outermost layout LinearLayout he will fill the whole layout, navigation and went out

CodePudding user response:

Relative layout do you use the android: layout_alignParentBottom="true" linear layout will, of course, he is top-down design layout into the bottom this layout is not suitable for linear layout or a relative layout on the properties of interface rendering will also reduce the consumption