0

how to add images above the image? this is my screen shot https://i.stack.imgur.com/S0Ipg.jpg which have only 1 image in background now i want to add two imagebutton like this image https://i.stack.imgur.com/9TBD8.jpg below is my code which have only background image below is my code which have background imeage onheader Linearlayout how i add two images on left and right side??

   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#ffffff"
    android:orientation="vertical" >


        <LinearLayout

  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
   android:background="@drawable/imagelogo2"

  android:orientation="horizontal" >




      </LinearLayout>



      <LinearLayout
        android:id="@+id/lytContent"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/txtCopyright"
        android:layout_marginTop="10dp"
         android:background="@drawable/border2" 
        android:layout_below="@+id/lytTitlebar"
        android:orientation="vertical" >



        <ListView
            android:id="@+id/listMainMenu"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"

            android:listSelector="@drawable/listview_selector"
            android:dividerHeight="1dip"
            android:fadeScrollbars="true" />
     </LinearLayout>



    </LinearLayout>
user2686011
  • 59
  • 1
  • 8

2 Answers2

1

Best way to use overlap images is through frame layout Try this code

<FrameLayout 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android">
    <ImageView 
        android:src="@drawable/onlymobilepro"
        android:scaleType="fitCenter"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"/>
    <TextView
        android:text="This is Frame Layout!!!"
        android:textSize="24px"
        android:textColor="#cc0000"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:gravity="top"/>
    <TextView
        android:text="Learn Android Development At onlyMobilePro.com"
        android:textSize="24px"
        android:textColor="#00dd00"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:gravity="center"/>
</FrameLayout>
0

For overlapping images you should probably use Framelayout, For more info on Frame layout see this link,

hemantsb
  • 2,049
  • 2
  • 20
  • 29