hi thank for the reply!!i done it and using relativelay.
i am facing a new problem ie, i want to fill whole screen with the
background image.code i am trying is:

requestWindowFeature(Window.FEATURE_NO_TITLE);
        
getWindow().setFlags(WindowManager.LayoutParams.FILL_PARENT,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main);

xml code is:
<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"
    >
<ImageButton
  android:id="@+id/btnSequence"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/btn_sequence"
  android:gravity="center_vertical"
  />
<ImageButton
  android:id="@+id/btnVideo"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/btn_video"
  android:gravity="center_vertical"
  />
<ImageButton
  android:id="@+id/btnInfo"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:src="@drawable/btn_info"
  android:gravity="center_vertical"
  />
</LinearLayout>
On Nov 2, 4:02 pm, Kostya Vasilyev <[email protected]> wrote:
> 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....
>
> 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