Android Question Homescreen Widget Graphics Size

Rusty

Well-Known Member
Licensed User
Longtime User
I have a home screen widget that supports several variants. (1280X800, 800X1280, 320X480, 480X...)
Within the layout I have an image view that needs to "scale" to the current size/orientation.
Since it is a home screen widget, rotation isn't (doesn't seem to be) supported, so rotation isn't an issue.
However, I have graphic files (images) that are much too large for the image view on i.e. 320X480 the image view is scaled to fit, but the graphic, being so large is "truncated".
Is there a way to get the size of the image and loadbitmapsample (or other)?
Thanks,
Rusty
 

derez

Expert
Licensed User
Longtime User
Look at jpeg library by Agraham, or just use bmp.initializesample to make the bitmap with the size you need.
 
Upvote 0
Top