I have an Android screen & amp; I am trying to align the classes of four sizes equally; I feel like a million different ways, which is trying now, still does not work with them: (.
This is what I found:
< Pre> Lt &; LinearLayout Xmlns: android = "Http://schemaskandroidkcom/apk/res/android" android: id = "@ + id / Mastrleaut" Android: Layout_width = "Wrap_content" Android: layout_height = "fill_parent" android: background = "# FFFFFF" & gt; & lt; TableLayout Android: Layout_width = "Fill_parent" android: id = "@ + id / mainlay" android: background = "# 444444" Android: Layout_weight = "0.2" Ndroid: layout_height = "wrap_content" android: padding = "0dip" & gt; & lt; TableRow Android: layout_weight = "1" android: background = "# BBBBBB" android: padding = "0dip" & gt; & lt; imageView android: id = "@ + id / ImageView1" Android: layout_marginLeft = "10px" Android: layout_weight = "1" Android: layout_marginRight = "5px" Android: Layout_height = "Wrap_content" Android: Layout_width = "Wrap_content" Android: ScaleType = "CenterInside" Android: src = "@ drawable / bigbox_new" & gt; & Lt; / ImageView & gt; & Lt; Android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: id = "@ + id / ImageView2" android: layout_marginLeft = "5px" Android: layout_weight = "1" Android: layout_marginRight = "10px" Android: ScaleType = "CenterInside" Android: src = "@drawable / bigbox_aquo" & gt; & Lt; / ImageView & gt; & Lt; / TableRow & gt; & Lt; TableRow Android: Layout_weight = "1" Android: padding = "0dip" & gt; & Lt; Android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: id = "@ + id / ImageView3" android: layout_marginLeft = "10px" Android: layout_weight = "1" Android: layout_marginRight = "5px" Android: ScaleType = "CenterInside" Android: src = "@drawable / bigbox_aquo" & gt; & Lt; / ImageView & gt; & Lt; Android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: id = "@ + id / ImageView4" android: layout_marginLeft = "5px" Android: layout_weight = "1" Android: layout_marginRight = "10px" Android: ScaleType = "CenterInside" Android: src = "@drawable / bigbox_aquo" & gt; & Lt; / ImageView & gt; & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; / LinearLayout & gt;
It'm Although basically, the four images above each one is a huge padding underneath I figure out how to get rid of it? Or do I need to use a different layout type?
To help clarify my problem, there is a picture here on what I have found on the left, what do I want on the right
Thanks a lot!
Cheers, Marcus!
Remove layout_weight
from your tables and type your layout_height
To wrap_content
. Then set to layout_height
fill_parent
. Add empty table Rao with
Comments
Post a Comment