Home > Mobile >  Layout controls show not to come out, how to deal with?
Layout controls show not to come out, how to deal with?

Time:10-02

Why linearlayout defines how to layout, and the final button show not to come out, how to display


The android: id="@ + id/parent"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
Android: orientation="vertical" & gt;


The android: id="@ + id/title"
Android: layout_width="match_parent"
Android: layout_height="38 dp"
Android: background="@ drawable/bg_top" & gt;
The android: id="@ + id/exit"
Android: layout_width="15 dp"
Android: layout_height="15 dp"
Android: layout_centerVertical="true"
Android: layout_marginLeft="18 dp"
Android: background="@ drawable/selector_exit"/& gt;
,,,


Android: layout_below="@ + id/title"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
Android: background="@ android: color/black" & gt;

NoteBook //custom surfaceview
The android: id="@ + id/note_book"
Android: layout_below="@ + id/title"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
20 cfe6 android: background="#"/& gt;



LinearLayout
The android: id="@ + id/btn_list"
Android: layout_width="33 dp"
Android: layout_height="155 dp"
Android: orientation="vertical"
Android: background="@ drawable/btn_list_bg"
Android: layout_alignParentRight="true"
Android: layout_marginRight="20 dp"
Android: layout_below="@ + id/title" & gt;


The android: id="@ + id/pen"
Android: layout_width="21 dp"
Android: layout_height="21 dp"
Android: layout_marginTop="17 dp"
Android: layout_marginLeft="6 dp"
Android: background="@ drawable/selector_pen"
/& gt;
The android: id="@ + id/import_whiteboard"
Android: layout_width="21 dp"
Android: layout_height="21 dp"
Android: layout_marginTop="13 dp"
Android: layout_marginLeft="6 dp"
Android: background="@ drawable/selector_import"
/& gt;




& lt; The Button
The android: id="@ + id/scale2"
Android: layout_width="20 dp"
Android: layout_height="20 dp"
Android: layout_alignParentBottom="true"
Android: layout_alignParentRight="true"
Android: layout_gravity="end"
Android: layout_marginBottom="5 dp"
Android: layout_marginRight="5 dp"
Android: background="@ drawable/selector_scale"/& gt;
-->

CodePudding user response:

Be LinnerLayout the RelativeLayout covered above

CodePudding user response:

reference 1/f, dear Joe reply:
were covered with LinnerLayout above the RelativeLayout


I behind three notebook LinnerLayout button sets a framelayout doesn't work, how to display

CodePudding user response:

Feel you write this layout is a bit complicated, you don't show the whole is more than the screen and can take relative layouts instead of linear layouts, or to the height of the linear layout down first do a compatible, hope to adopt

CodePudding user response:

Id for the title of the RelativeLayout, namely a RelativeLayout height set to wrap_content LinearLayout, non match_parent, otherwise you how the back of the layout Settings will be overwritten, shows don't come out

CodePudding user response:

refer to the second floor yekeyishuo response:
I behind three notebook LinnerLayout button sets a framelayout doesn't work, how to display


 
<? The XML version="1.0" encoding="utf-8"?>
The android: id="@ + id/parent"

Android: id="@ + id/title" 1


Android: layout_below="@ + id/title" 2


The android: id="@ + id/btn_list"
Android: layout_below="@ + id/title"
no. 3


4


Above is your layout simple model, the no. 2 and 3, you are using a layout_below title, then, according to the rendering order, should be not keep out LinnerLayout, but your number two is a set of the view, so the problem here,

However, solve the problem is not from here, but should start from the layout,
Now that you are the no. 2 and no. 3 are below the title, number one, why not use FrameLayout package no. 2 and no. 3, then give the no. 3 were set to the top,
  • Related