views:

10

answers:

1

Hello experts, I wanted to have a custom layout where I would have gallery on top, then below it to have a simple widget to show the picture when it is chosen from the gallery. I could not figure out how to compose that main.xml to achieve it, your advice will be greatly appreciated.

The gallery layout xml is straight from the google tutorial and is working. How do I modify it to achieve the above?

android:layout_width="fill_parent"
android:layout_height="wrap_content" />

HT

A: 

ok, I have figured it out for myself, for others who may need this in the future, the main.xml looks below:

  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
      android:layout_height="fill_parent">

<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/gallery"    
    android:layout_width="fill_parent"    
    android:layout_height="wrap_content"
/>
<ImageView
    android:id="@+id/image1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/gallery"
    android:layout_alignParentRight="true"
    android:layout_marginLeft="10dip"
    /></RelativeLayout>
Henry