Android - Can't make the textview below the framelayout -


i have textview , framelayout inside linearlayout. can't make textview below framelayout, keeps staying @ top.

this code :

<linearlayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical" >      <textview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:gravity="bottom"         android:text="textview" />      <framelayout         android:layout_width="match_parent"         android:layout_height="match_parent" >          <framelayout             android:id="@+id/content_frame"             android:layout_width="match_parent"             android:layout_height="match_parent" />          <imagebutton             android:id="@+id/btngototop"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_gravity="center|bottom"             android:layout_margin="5dip"             android:background="@drawable/buttongototop"             android:padding="5dip"             android:visibility="gone" />     </framelayout>  </linearlayout> 

<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">          <framelayout             android:id="@+id/content_frame"             android:layout_width="match_parent"             android:layout_height="match_parent" />          <imagebutton             android:id="@+id/btngototop"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_gravity="center|bottom"             android:layout_margin="5dip"             android:background="@drawable/buttongototop"             android:padding="5dip"             android:visibility="gone" />     </framelayout>      <textview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:gravity="bottom"         android:text="textview" />  </linearlayout> 

pay attention framelayout's layout_weight , layout_height. if kept height match_parent, fit whole screen, positioning textview right after end of screen.

check link layout_weight in linearlayouts.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -