Worked out with android:weightSum
quite nice..!!!

On Dec 2, 1:18 pm, adag <adjo...@googlemail.com> wrote:
> Hello All,
>
> I am having multiple choice list where I have three column like below
> *************************
> Col1           Col2 Col3
> *************************
> Col2 and Col3 should be right aligned with a gap of 10 px in between
>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     android:orientation="horizontal" >
>
>                         <TextView android:id="@+id/TextView01"
>                         android:text="my list"
>                         android:layout_width="wrap_content"
>                         android:layout_height="wrap_content"
>                         android:layout_marginLeft="4dip"
>                         android:gravity="center_vertical"
>                         android:textStyle="bold"
>                         android:textColor="#000000"
>                         />
>                 <LinearLayout android:layout_width="fill_parent"
>                     android:layout_height="fill_parent"
>                          android:orientation="horizontal"
>                          android:baselineAligned="true"
>                          android:gravity="right"
>                          android:baselineAlignedChildIndex="1"
>                          >
>                         <TextView android:id="@+id/TextView03"
>                                 android:text="0"
>                                 android:layout_width="wrap_content"
>                                 android:layout_height="wrap_content"
>                                 android:layout_alignParentRight ="true"
>                                 android:layout_alignRight="@+id/TextView04"
>                             android:layout_marginRight="20px"
>                             android:gravity="right"
>                             android:maxWidth="10dip"
>                                 android:textSize="20px"
>                                 android:textStyle="bold"
>                                 android:textColor="#000000"/>
>
>                         <TextView android:id="@+id/TextView04"
>                                 android:text="0"
>                                 android:layout_width="fill_parent"
>                                 android:layout_height="wrap_content"
>                                 android:gravity="right"
>                                 android:layout_marginRight="10px"
>                                 android:textSize="20px"
>                                 android:textStyle="bold"
>                                 android:textColor="#000000"/>
>                 </LinearLayout>
> </LinearLayout>
> **************************
> But the layout is not coming as expected. Col1 and Col2 are coming
> next to Each other, But I can restrict Col3 to be right Aligned.
> Col1Col2              Col3
>
> Any further suggestion to make it correct would be really appreciable.
>
> Regards,
> adag

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