Have you tried the android:layout_gravity attribute?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Apr 26, 2012 at 6:59 AM, Niels Delporte <[email protected]>wrote:

> Hi Romain Guy,
>
> I know this is a very old post, but still wanted to ask you something
> relating to this.
> You see, I want to achieve the same result but wit a TextView and another
> LinearLayout within a LinearLayout.
> I'm experiencing the same problem though.
>
> <LinearLayout
>   xmlns:android="http://schemas.android.com/apk/res/android";
>   android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>   android:orientation="vertical"
>   >
>               <LinearLayout
>                  android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>  android:orientation="horizontal"
>   >
>
>      <TextView
>             android:id="@+id/name"
>   android:layout_width="wrap_content"
>     android:layout_height="wrap_content"
>    />
>
> <LinearLayout
>     android:layout_width="wrap_content"
>     android:layout_height="wrap_content"
>     android:orientation="horizontal"
>     android:gravity="right"
>     >
>
>      <ImageView
>          android:layout_width="16dip"
>          android:layout_height="15dip"
>          android:src="@drawable/foo"
>          android:contentDescription="@string/accessibility_foo" />
>
>  </LinearLayout>
>
>  </LinearLayout>
>
>  <TextView
>              android:id="@+id/message"
>  android:layout_width="fill_parent"
>    android:layout_height="wrap_content"
>    android:layout_marginTop="10dip"
>   />
>
> </LinearLayout>
>
> Can you see why my inner LinearLayout doesn't want to anchor to the
> outmost rigt?
>
> Thank you in advance!
>
> Niels
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to