After adding android:layout_width="75px" in every <TextView> it looks better. But still there is any other solution?
On Dec 28, 2:15 pm, "pramod.deore" <deore.pramo...@gmail.com> wrote: > Hi all, > In my application I am showing data to the user from > database using SimpleCursorAdapter. But here I am facing problem - It > retrieves and show all data correctly but size of each column is vary > (because if suppose thereare 5 columns and first row has column 2 as > string - "Hall" and second row has column 2 as "My Dining Hall > Number1" then data is not displayed properly, means this column ends > where all columns pf row 1 finished. So what to do? How to assign > fixed size to each column? or there is any way using that I can > display some data in first line and if string is big then other part > is displayed on next line of same column. my xml file is as > > <?xml version="1.0" encoding="utf-8"?> > > <TableLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > <TableRow> > <TextView android:id="@+id/roomName" > android:gravity="center" > android:layout_weight="0.5"/> > > <TextView android:id="@+id/switchName" > android:gravity="center" > android:layout_weight="0.5"/> > > <TextView android:id="@+id/startDate" > android:gravity="center" > android:layout_weight="0.5"/> > > <TextView android:id="@+id/totalTime" > android:gravity="center" > android:layout_weight="0.5"/> > > <TextView android:id="@+id/startMin" > android:gravity="center" > android:layout_weight="0.5"/> > > </TableRow> > </TableLayout> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en