I build layout xml with two images and put as the LinearLayout backgrund an image too.
the problem is that my top image start 10 px under the main screen and then i saw the top of the LinearLayout background image.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/hazmanag" android:layout_gravity="top">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/uph"
android:layout_gravity="top|center"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/coupon" android:layout_gravity="top|center"/>
</LinearLayout>
You should try something like this:
You have defined android margins in all directions Top, Bottom, Left and Right so you can place the object anywhere in the screen!