bCliks
bCliks

Reputation: 2958

How to overlay imageview on gallery ?

I want to overlay imageview and gallery like below image

i want like this

i tried like this..

<RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="70dp" >
<ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"        
        android:src="@drawable/title_header" />

<Gallery 
        android:id="@+id/Gallery" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"></Gallery>

</RelativeLayout>

but its not overlay. pls help me..

Upvotes: 2

Views: 209

Answers (1)

Jignesh Ansodariya
Jignesh Ansodariya

Reputation: 12685

please try this

<RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="70dp" >

<Gallery 
    android:id="@+id/Gallery" 
    android:layout_width="fill_parent" 
    android:layout_marginTop="10dip"
    android:layout_height="wrap_content"></Gallery>

<ImageView
    android:layout_width="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_height="wrap_content"        
    android:src="@drawable/title_header" />

</RelativeLayout>

android:layout_marginTop="10dip" give value as needed.

Upvotes: 1

Related Questions