[mono-android] Table Layout Q
Paul F. Johnson
paul at all-the-johnsons.co.uk
Sat Nov 12 11:27:48 EST 2011
Hi,
I have a table layout defined. Some rows have one thing in, some rows
have two things in (textview and editview) and these are fine.
However, I've hit a problem with three things in on a row and row
formatting in general....
First the in general.
The table is set up without a stretchSpan attribute
The rows seem to be ignoring the layout_width attribute
<TableRow
android:id="@+id/surroundRow"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:id="@+id/surroundTempLabel"
android:layout_width="100px"
android:layout_height="wrap_content"
android:text="Temp of surrounds (degrees C)"/>
<EditView
android:id="@+id/supproundTemp"
android:layout_width="50px"
android:layout_height="32px"
android:text=""
android:numeric="decimal"
android:textSize="14sp"/>
</TableRow>
The row with 3 things in is more or less the same
<TableRow
android:id="@+id/weightRow"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:id="@+id/weightBodyLabel"
android:layout_width="100px"
android:layout_height="wrap_content"
android:text="Temp of surrounds (degrees C)"/>
<EditView
android:id="@+id/weightBodyTemp"
android:layout_width="50px"
android:layout_height="32px"
android:text=""
android:numeric="decimal"
android:gravity="left"
android:textSize="14sp"/>
<CheckBox
android:id="@+id/inKG"
android:width="50px"
android:gravity="right"
android:text="in kg?"/>
</TableRow>
Unfortunately, when I run this, I get the attached image - which isn't
what I'm expecting.
Any advice or help on this would be appreciated.
Paul
--
Vertraue mir, ich weiss, was ich mache...
More information about the Monodroid
mailing list