I had still facing this problem. Can anyone please solve this one? On Dec 29, 8:09 am, "pramod.deore" <deore.pramo...@gmail.com> wrote: > Any Idea? > > On Dec 28, 5:15 pm, "pramod.deore" <deore.pramo...@gmail.com> wrote: > > > After changing 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> > > 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> > > </ScrollView > > > </LinearLayout> > > > Now here it shows labels at each row. what I want is labels are shown > > only at the top. > > > On Dec 28, 4:40 pm, "pramod.deore" <deore.pramo...@gmail.com> wrote: > > > > Thanks Sir. > > > On Dec 28, 4:32 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > > > 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/commonsguyhttp://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