set gravity of image button as center_horizontal and center_vertical On Tue, Nov 2, 2010 at 12:19 PM, Alok Upadhyay <maddy.luck...@gmail.com>wrote:
> Hii, > I have three image buttons which i want to aligne center vertically.i > have layout something like this: > > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="@drawable/homepage_image" > android:gravity="center_horizontal" > > > > <ImageButton > android:id="@+id/btnSequence" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:src="@drawable/btn_sequence" > android:scaleType="center" > /> > > <ImageButton > android:id="@+id/btnVideo" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:src="@drawable/btn_video" > android:scaleType="center" > /> > > <ImageButton > android:id="@+id/btnInfo" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:src="@drawable/btn_info" > android:scaleType="center" > /> > </LinearLayout> > > although i have tried frame and relative but then image are > overlapping each other. > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Thanks & Regards, Renuka -- 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