Stretch and fill middle Layout Android -


i have main relative layout(height,width=fill parent) has 3 layouts inside it:

1st: frame layout(width=fill_parent/height=wrap_content) 2nd: linear layout(width=fill_parent/height=wrap_content/layoutbelow 1st) 3rd: relative layout(height=wrap_content/width=fill parent/layout_alignparentbottom="true"/ layoutbelow 2nd) 

i want 3rd layout @ bottom of screen , 1st @ top of screen , 2nd fill space in between. how do this? followed link:android linearlayout fill-the-middle , tried setting layout_height="0px" , layout_weight="1" did not work. can please me this?

thanks

try :

1st: frame layout(width=fill_parent/height=wrap_content)

2nd: linear layout(width=fill_parent/height=wrap_content/layoutbelow 1st/layoutabove 3rd)

3rd: relative layout(height=wrap_content/width=fill parent/layout_alignparentbottom="true")

for example :

<relativelayout 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">      <button         android:id="@+id/btnbutton1"         android:layout_height="wrap_content"         android:layout_width="fill_parent"         android:text="1"/>      <button         android:id="@+id/btnbutton2"         android:layout_height="wrap_content"         android:layout_width="fill_parent"         android:text="2"         android:layout_below="@+id/btnbutton1"         android:layout_above="@+id/btnbutton3"/>      <button         android:id="@+id/btnbutton3"         android:layout_height="wrap_content"         android:layout_width="fill_parent"         android:text="3"         android:layout_alignparentbottom="true"/>  </relativelayout> 

screenshot


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -