android - Inserting a table row inside a table row -


i want insert 2 table rows inside table row vertically. being done rows being added horizontally instead of vertically. how add vertical rows.. following xml.

                <tablelayout                      android:layout_width="fill_parent"                     android:layout_height="wrap_content"                     android:id="@+id/tablelayout1"                 >                     <tablerow                          android:layout_width="fill_parent"                          android:layout_height="wrap_content"                         android:orientation="vertical"                     >                         <tablerow                         android:layout_column="0"                         android:layout_width="fill_parent"                         android:background="@drawable/eventbar"                          android:layout_height="wrap_content"                          android:id="@+id/tablerow1" >                         <textview                              android:gravity="center_vertical"                             android:layout_width="wrap_content"                             android:text="calendar 14 august 2011"                             android:layout_height="wrap_content"                             android:textcolor="@drawable/white"                             android:layout_marginleft="10dp"                         />                         </tablerow>                         <tablerow                          android:layout_column="0"                             android:layout_below="@+id/tablerow1"                            android:layout_width="fill_parent"                            android:background="@drawable/bgrow"                            android:layout_height="wrap_content">                                 <listview                                      android:layout_height="wrap_content"                                     android:layout_width="fill_parent"                                     android:id="@+id/listview2" >                                 </listview>                         </tablerow>                     </tablerow>                  </tablelayout> 

can me how this?

i think misunderstood how tablelayout works. if read in tutorial see, tablelayout works html tables, meaning tablerow defines row, not column , not intended otherwise. columns created automatically based on views add rows.

thus, if want have 2 rows 2 textviews each, add 2 tablerows tablelayout, , insert 2 textviews each of them.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -