How to resize raster images when loading from xml

I know that I can resize bitmaps downloaded programmatically using BitmapFactory.Options (i.e. forcing 32 through ARGB_8888 or 16 bits through RGB_565). Is there an equivalent when loading bitmaps via xml (for example, when defining drawings and background images in a layout)? If there is no built-in switch that configures this, is there any way to accomplish this, except to strip the graphics from xml and process them manually?

+1
source share
1 answer

You cannot do this from XML, you need to do this from code.

+1
source

All Articles