The gravity attribute should be in the linearlayout, not the imageview. The gravity attribute tells you what the gravity should be within a certain area (ie textview or viewgroup)
On Jul 5, 10:08 am, neil monteiro <[email protected]> wrote: > Hi > > Give layout_width="wrap_content" for ImageView > > Thanks > Neil > > > > On Mon, Jul 5, 2010 at 2:25 AM, cindy <[email protected]> wrote: > > Hi All, > > > In the linearlayout, I need to put the image at right. I have tried a > > lot of method, none of them works. Can someone point out what is > > wrong? > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:layout_width="fill_parent" > > android:id="@+id/logo_block" > > android:padding="10px" > > android:layout_height="wrap_content"> > > <ImageView > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > android:gravity="right" > > android:layout_alignParentRight="true" > > android:src="@drawable/logo_poweredby"/> > > </LinearLayout> > > > Thanks! > > > Cindy > > > -- > > 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]<android-developers%2Bunsubs > > [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

