Thanks so much for taking the time to post your solution Cindy. I had been bugged by a similar problem for hours and just hadn't thought of wrapping my Image views in a Linear Layout container in order to get them aligned properly.
On Jul 7, 6:46 pm, cindy <[email protected]> wrote: > Following code works: > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:layout_width="fill_parent" > android:id="@+id/logo_block" > android:padding="10px" > android:gravity="right" > android:layout_alignParentRight="true" > android:layout_height="wrap_content"> > <ImageView > android:layout_width="wrap_content" > android:layout_height="fill_parent" > android:src="@drawable/logo_poweredby"/> > </LinearLayout> > > On Jul 7, 5:12 am, Levi <[email protected]> wrote: > > > > > > > > > If you put one view in the layout then the result will be the same > > > 在 2010年7月7日 下午8:07,Levi <[email protected]>写道: > > > > Why not using RelativeLayout ?You can set a property > > > android:layout_alignParentRight="true" ,then what you want will be show > > > good luck! > > > > 2010/7/7 cindy <[email protected]> > > > > Have tried all those, none of them works. Does it mean we can't put a > > >> imageview to right? > > > >> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > >> android" > > >> android:layout_width="fill_parent" > > >> android:id="@+id/logo_block" > > >> android:padding="10px" > > >> android:gravity="right" > > >> android:layout_height="wrap_content"> > > >> <ImageView > > >> android:layout_width="fill_parent" > > >> android:layout_height="fill_parent" > > >> android:src="@drawable/logo_poweredby"/> > > >> </LinearLayout> > > > >> On Jul 6, 6:15 pm, Levi <[email protected]> wrote: > > >> > Hi,try it.... Good Luck! > > > >> > <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" > > >> > android:gravity="right"> > > >> > <ImageView > > >> > android:layout_width="fill_parent" > > >> > android:layout_height="fill_parent" > > >> > android:src="@drawable/logo_poweredby"/> > > >> > </LinearLayout> > > > >> > 2010/7/5 cindy <[email protected]> > > > >> > > 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%[email protected]> > > >> <android-developers%[email protected]<android-developers%[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]<android-developers%[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

