How would you design this in Android? A split screen with a button -


i'm not sure whether use relativelayout and/or linearlayout design following screen! mind helping me out?

the correct answer can found here: how can add new "floating action button" between 2 widgets/layouts

image of layout

the easiest option (since have button overlay) use relativelayout linearlayout nested inside (assuming guy squatting different widget 1 containing text). if image of guy sqatting , text in same widget, have replace linearlayout widget. children of relativelayout take higher precedence on z axis. can have relativelayout with:

<relativelayout     android:height="match_parent"     android:width="match_parent" >     <linearlayout         android:height="match_parent"         android:width="match_parent" >         <imageview             android:src="some_source"             android:height="0dip"             android:width="match_parent"             android:layout_weight="1"/>         <textview             android:text="your_text"             android:height="0dip"             android:width="match_parent"             android:layout_weight="1"/>     </linearlayout>     <imagebutton         android:id="@+id/someid"         android:src="some_source"         android:background="@android:color/transparent"         android:layout_centervertical="true"         android:layout_alignparentright="true"         android:layout_width="wrap_content"         android:layout_height="wrap_content" /> </relativelayout> 

keep in mind assuming image of guy squatting separate widget (imageview) , text below separate widget (textview) , '+' button separate widget overlaid on content.


Popular posts from this blog