> Option #1: Put the TableLayout in a ScrollView, wrap the ScrollView in > a LinearLayout, put the labels above the ScrollView in the > LinearLayout, and have the labels be incorrectly located over the > columns.
As Mark said I had made changes in xml file but still it shows labels at each row. I only want that labels are visible at the top of list. Here is my new xml file as <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <TableRow> android:textColor="#00FF00"> <TextView android:text="Room Name" android:layout_width="85px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:text="Switch Name" android:layout_width="85px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:text="Start Date" android:layout_width="95px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:text="Start Time" android:layout_width="50px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:text="Stop Date" android:layout_width="95px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:text="Stop Time" android:layout_width="50px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> </TableRow> </TableLayout> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <TableRow> <TextView android:id="@+id/roomName" android:layout_width="85px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:id="@+id/switchName" android:layout_width="85px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:id="@+id/startDate" android:layout_width="95px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:id="@+id/totalTime" android:layout_width="50px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:id="@+id/stopDate" android:layout_width="95px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> <TextView android:id="@+id/totalStopTime" android:layout_width="50px" android:textSize="15sp" android:textColor="#00FF00" android:typeface="monospace" android:gravity="center" /> </TableRow> </TableLayout> </ScrollView > </LinearLayout> On Dec 31 2010, 9:26 pm, TreKing <treking...@gmail.com> wrote: > On Thu, Dec 30, 2010 at 4:16 AM, pramod.deore <deore.pramo...@gmail.com>wrote: > > > I had still facing this problem. Can anyone please solve this one? > > Mark already gave you two options. If you were trying the first, you did not > follow what he said. > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- 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