Best dimension to put in Android background app? [duplicate]

0

I developed a splash for an android app and included a background image with the command:

android:background="@drawable/bg16"

The image appeared, but due to its dimensions, it turned out to be a bit flat. Is there any standard dimension for images in Android applications?

    
asked by anonymous 29.01.2018 / 13:13

1 answer

1

You probably need a Nine-Patch . It's basically a PNG file in which you specify two-dimensional regions that can be stretched:

Excerptedfromthe documentation about supporting screens of different sizes:

  

If your UI uses bitmaps that need to fit the size of a view even after the system scales the layout (such as the background image for a button), you should use Nine-Patch bitmap files. A Nine-Patch file is basically a PNG file in which you specify two-dimensional regions that are stretchable. When the system needs to scale the view in which the bitmap is used, the system stretches the Nine-Patch bitmap, but stretches only the specified regions.

Nine-Patches can be created with the Draw 9-patch tool included in Android Studio.

/ p>     

29.01.2018 / 13:20