android - Where should I put background images in different screensizes? -
i've been reading drawable-xxdpi
folders, , created icons in sizes.
what want now, put background image on main screen. , assumption @ moment, don't work dp
@ moment px
, because background image needs fill pixels
.
when assumption correct, put created background images?
i've created 1 480*320
, 800*400
largest 1600x2560
. in assumption can't put them in drawable-xxdpi
folders because dpi
related, , need fill pixels
.
i don't work dp @ moment px
... should always use dp.
fill available space, use android:background
instead of android:src
.
note image stretched (if don't make 9 patch - stretched, in "controlled manner").
to create background exact pixel size
not practice.
you'd end wit oversized images.
better practices include (not mutually exclusive - can stacked using layer-list):
- stretchables (such 9 patches)
- tiles (seamlessly tileable pictures)
- drawables (which vectorial, svg files)
these ones include:
- shapes
b - gradients
c - ... - svg (through 3rd party libraries)
- ...
also consider "the exact pixel size" might different expect.
have take in account statusbar, actionbar/toolbar, menubar, ...
Comments
Post a Comment