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.

Option #2: Write your own AdapterView that implements your desired
scrolling and table rules.

There may be other options, but those are the most likely pair AFAIK.

On Tue, Dec 28, 2010 at 6:26 AM, pramod.deore <deore.pramo...@gmail.com> wrote:
> I have following tablelayout in my xml file.
>
> <?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>
>                        android:textColor="#00FF00">
>                <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>
>
> Here I have 6 columns in each row. Now I want to add label to each
> column which must be visible after scrolling this list.
>
> Thanks
>
> --
> 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
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.3 Available!

-- 
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

Reply via email to