i am using API 16 (Jellybean), 4.0 WVGA (480x800: hdpi)
and i am trying to set a 480x800 image in background
i put a image in "drawable-hdpi" but this image is not fitting in background, why this is not fitting in background when i am using 4.0 WVGA (480x800: hdpi) and same as image size
how drawable works to fit image:
this is my code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.newapp.Firstscreen$PlaceholderFragment" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/background" />
</RelativeLayout>
see screenshot: