Frage

I need to support multiple screens with the app. The app is a web app and the only native part is splash screen. I have a bundle of images with the following sizes: xlarge (xhdpi): 640x960 large (hdpi): 480x800 medium (mdpi): 320x480 small (ldpi): 240x320

In case of wvga854 I have blank spaces on the top/bottom of the screen. I've solved it by creating drawable-normal-long-hdpi. If I want my app to support most of the screens and tablets (official reference then I need to create folders for all possible combinations, am I right? In that case what would be the names of those folders?

War es hilfreich?

Lösung

You've already mentioned the correct article for this problem. There is written:

res/drawable-mdpi/my_icon.png        // bitmap for medium density
res/drawable-hdpi/my_icon.png        // bitmap for high density
res/drawable-xhdpi/my_icon.png       // bitmap for extra high density
res/drawable-xxhdpi/my_icon.png     

Additional you could add normal-long like you said (but I don't think this is necessary):

res/drawable-normal-long-mdpi/my_icon.png        // bitmap for medium density
res/drawable-normal-long-hdpi/my_icon.png        // bitmap for high density
res/drawable-normal-long-xhdpi/my_icon.png       // bitmap for extra high density
res/drawable-normal-long-xxhdpi/my_icon.png     

Also you need to consider if you maybe create folders for different orientations (land, port)

Edit: You should stick with Xoxols answer: android:scaleType should do the trick to get rid of gaps on top and bottom of the screen.

Andere Tipps

maybe scaling for your images?
android:scaleType for example

Check out my blog. Maybe it helps to clear things up. http://objectofclasshuman.blogspot.de/2014/04/android-user-interface.html

Additional use flexable layouts like relative layout and imageview with scaletype=fitcenter

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top