[android-developers] list view two columns

2010-10-06 Thread Varun Khanduja
Hello all,

I am trying to see if someone can help me with a simple list view I am
tying to make. I am specifically facing problem trying to introduce a
new column in this list view. Label 3 in xml code below is the new
column I m trying to make. Should I have a new linear layout and wrap
two text views in it or is there some other option?


?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=
   http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=horizontal
ImageView
android:id=@+id/icon
android:layout_width=22px
android:paddingLeft=2px
android:paddingRight=2px
android:paddingTop=2px
android:layout_height=wrap_content
android:src=@drawable/icon/
LinearLayout
android:layout_width=wrap_content
android:layout_height=wrap_content
android:orientation=vertical
TextView
android:id=@+id/label1
android:layout_width=wrap_content
android:layout_height=wrap_content
android:textSize=24sp/
TextView
android:id=@+id/label2
android:layout_width=wrap_content
android:layout_height=wrap_content
android:textSize=24sp/
TextView
android:id=@+id/label3
  android:layout_height=wrap_content
android:layout_width=wrap_content
android:layout_toRightOf=@+id/label1
android:textColor=#ffFFffFF
android:layout_marginRight=25dip
android:text=score
/

/LinearLayout
/LinearLayout

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


Re: [android-developers] list view two columns

2010-10-06 Thread TreKing
On Wed, Oct 6, 2010 at 12:55 PM, Varun Khanduja varunkhand...@gmail.comwrote:

 I am trying to see if someone can help me with a simple list view I am
 tying to make. I am specifically facing problem trying to introduce a new
 column in this list view. Label 3 in xml code below is the new column I m
 trying to make. Should I have a new linear layout and wrap two text views in
 it or is there some other option?


I'm not sure what you're trying to achieve. Pictures usually help with
layout problems. But if you want a column after the LinearLayout that has
two view, then do just that - add the new TextView after the inner
LinearLayout. That should be all you need.

-
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