-1

In my project exist 4 drawable folder ,and same image in there

I have splash screen in 4 layout (small,large,xlarge)

splash xlarge

in xlarge splash layout ,in center I have another image but that don't fix with res drawable-xhdpi image same as this

splash screen medium

< merge xmlns:android="http://schemas.android.com/apk/res/android">
    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:src="@drawable/bg_logo" />

</ merge>

how can I solve this problem ?

Praful Bhatnagar
  • 7,425
  • 2
  • 36
  • 44
Saeed Hashemi
  • 984
  • 4
  • 22
  • 55

3 Answers3

1

In each drawable folder you haveto store different resoulutions if you want to achieve identical result, or you can use 1 folder and this pic will be resized.

To find out what sizes do you need, check this:

http://developer.android.com/guide/practices/screens_support.html

dilix
  • 3,761
  • 3
  • 31
  • 55
1

Try to add this in your Manifest file :

<supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true" 
        android:xlargeScreens="true"
        android:resizeable="true"/>

Hope it helps you.

Thanks.

Pratik Sharma
  • 13,307
  • 5
  • 27
  • 37
1

You can use 9 patch images for differnt screen to use that image create drawable folder in res and put here your 9 patch images and set this Images in your layout, this may helps you

Ankitkumar Makwana
  • 3,475
  • 3
  • 19
  • 45