Reputation: 133
i have some large resolution images that I need to scale to fit every screen as a background, the images are size of 1800x2880 and I need them to scale down to every screeen without any stretching(they are illustrations). What is the best approach?
Upvotes: 0
Views: 416
Reputation: 39836
The best approach is to read the android developer guide regarding supporting multiple screen sizes and do exactly as they say there.
Anything else someone might answer you here will be simplification or copy or re-written with his own words of what said there.
edit:
regarding stretching the images you have two possible approaches:
CENTER_INSIDE
Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
Upvotes: 1
Reputation: 875
Image set on the xhdpi folder.In the XML you will be use fillparent.it will not be stretch.
Upvotes: 0