Alok,

FrameLayout is not what you want to use in this case.

http://developer.android.com/reference/android/widget/FrameLayout.html

FrameLayout is designed to block out an area on the screen to display a single item. You can add multiple children to a FrameLayout, but all children are pegged to the top left of the screen. Children are drawn in a stack, with the most recently added child on top.

I suggest you use RelativeLayout, it's really powerful, although takes some time to get used to.

http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html

For "back" button, specify android:layout_alignParentLeft="true", for "next", android:layout_alignParentRight="true".

-- Kostya

02.11.2010 13:06, Alok Upadhyay пишет:
i am trying to align my two image buttons (back and next) at the top
of an image background and trying like below xml code.But both the
images are overlapping on top left corner.

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/
android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
        android:gravity="center_horizontal"
        android:background="@drawable/image_wo_lbl_0"
     >
    <ImageView
    android:id="@+id/back"
    android:src="@drawable/btn_back"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    />
    <ImageView
    android:id="@+id/next"
    android:src="@drawable/btn_next"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    />

</FrameLayout>

Thanks!!



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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