I'd really appreciate a hand with layout issue I'm having.

I have seen a lot of example with TableLayout where folk are only using
layout_span to control the columns.

I want three equal columns.

Row 1:  1/3 and 2/3
Row 2:  1/3 + 1/3 + 1/3

Why do I have to throw in so many other attributes like weight and width to
make this happen?

I feel like a real idiot - this has consumed many hours with little forward
progress.

Here's my markup:

                                <TableLayout
                                                
android:layout_width="fill_parent"
                                                
android:layout_height="fill_parent"
                                                android:stretchColumns="*">
                                        <TableRow>
                                                <TextView
                                                        
android:layout_column="0"
                                                        
android:id="@+id/textStartTime"
                                                        
style="@style/InputItem.Label"
                                                        
android:layout_height="wrap_content"
                                                        
android:layout_weight="1"
                                                        
android:layout_width="0px"
                                                        
android:layout_gravity="center"
                                                        android:text="Start 
Time" />
                                                <DatePicker
                                                        
android:layout_column="1"
                                                        android:layout_span="2"
                                                        
android:layout_height="wrap_content"
                                                        
android:layout_weight="3"
                                                        
android:id="@+id/datePicker1" />
                                        </TableRow>
                                        <TableRow>
                                                <TextView
                                                        
android:layout_column="0"
                                                        
android:id="@+id/textTime"
                                                        
style="@style/InputItem.Label"
                                                        
android:layout_height="wrap_content"
                                                        
android:layout_weight="2"
                                                        
android:layout_width="0px"
                                                        
android:layout_gravity="center"
                                                        android:text="Time" />
                                                <EditText
                                                        
android:layout_column="1"
                                                        
style="@style/InputItem.Value"
                                                        
android:id="@+id/editTimeCardStartTime"
                                                        
android:layout_height="wrap_content"
                                                        
android:layout_weight="5"
                                                        
android:layout_gravity="center"
                                                        
android:layout_width="0px" />
                                                <Button
                                                        
android:layout_column="2"
                                                        
android:id="@+id/BtnSetTimeCardStartTime"
                                                        
android:layout_height="wrap_content"
                                                        
android:layout_weight="3"
                                                        
android:layout_width="0px"
                                                        
android:layout_gravity="center"
                                                        
android:text="@string/BtnSet"
                                                        
style="@style/ButtonOrdersActivity"/>
                                        </TableRow>                             
                                </TableLayout>

Here is the result: http://www.devbuzz.com/downloads/layout_issue.png
http://www.devbuzz.com/downloads/layout_issue.png
<http://www.devbuzz.com/downloads/layout_issue.png>  



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Please-could-someone-help-me-out-with-this-Table-Layout-tp5712513.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to