I have requirement to support all screen sizes on Android (Phones and Tablets). I have a set of images with resolutions 1280x720 and 2560x1600.
Question
How to name drawable
and layout
folders, so that these images are scaled correctly for all resolutions(if possible) ?
I'm clear that the question has been asked very often, but all I can find are half answers. I tried to create drawable folders with names:
drawable-xlarge-mdpi
- for 1200X800drawable-xlarge-xhdpi
- for 2560X1600
And for layout, with names:
layout-xlarge-mdpi
- for 1280x720layout-xlarge-xhdpi
- for 25601600
And added a manifest entry:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
But now, it works only for tablets. On phones it always fails with error.
I found an answer here: Drawables for qHD resolution
As I understand, all scaling occurs through code. But can anyone explain to me how to scale the image in the code with a resolution of 1280x720 and 2560x1600 and in which folder are to be placed in ?
I have read:
Application Skeleton to support multiple screen
Android : App support for multiple tablet screen resolutions
http://developer.android.com/guide/practices/screens_support.html
Android: support multiple screens
and many more.