tablelayout - android table layout one for both (landscape and portrait view) -


I want to create the following layout which should be 100% in the form of the appearance in the form of the picture.

Here is my code that I tried but not working

   & Lt; imageView android: id = "@ + id / reviewItemStarRating" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: src = "@ drawable / title_1_star" / & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; / TableRow & gt; & Lt; TableRow & gt; & Lt; TextView android: id = "@ + id / reviewItemDescription" Android: layout_width = "0dip" Android: Layout_height = "Wrap_content" android: text = "description comes here" Android: textSize = "12sp" / & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; imageView Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: src = "@ drawable / arrow_nxt" Android: layout_gravity = "center_vertical" Android: layout_alignParentRight = "true" / & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt;  

I think this is for you, remember to play with Android Lay: Layout_weight "value, it will basically tell widgets how much they should be expanded (use available free space).

Fun

  & lt; TableLayout xmlns :. Android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Fill_parent" Android: Leaut_hehet = "Br_perent" & gt; & Lt; TableRow android: layout_width = "fill_parent "Android: layout_height =" fill_parent "end Oid: Leaut_vet = "1" & gt; & Lt; TableLayout Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: Leaut_vet = "1" & gt; & LT; TableRow & gt; & LT; TextView Android text = "TextView top left" android: id = "@ + id / TextView01" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" android: gravity = "left" Android: layout_weight = "1" & gt; & Lt; / TextView & gt; & Lt; Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: src = "@Android: drawable / btn_plus" Android: gravity = "true" & gt; imageView Android: id = "@ + id / ImageView01" Android: layout_width = "wrap_content" & Lt; / ImageView & gt; & Lt; / TableRow & gt; & Lt; TableRow & gt; & Lt; TextView android: text = "text view" Android with padding: id = "@ + id / TextView02" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: PaddingBottom = "20k0dp" Android: PaddingLeft = " 20.0dp "Android: paddingRight =" 20.0dp "Android: paddingTop =" 20.0dp "Android: layout_weight =" 1 "& gt; & Lt; / TextView & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; Android: layout_height = "fill_parent" android: layout_weight = "0" & ​​gt; & Lt; TableRow android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: layout_weight = "1" & gt; & Lt; imageView android: id = "@ + id / ImageView02" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: src = "@ android: drawable / btn_minus" Android: layout_gravity = "center" & gt; & Lt; / ImageView & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt;  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -