I have a background image in the body. I want to achieve:
1). Calculate the visitor screen resolution.
2) - based on this resolution, I want to resize the background image.
I know the screen resolution is equal
Display display = getWindowManager().getDefaultDisplay(); width_screen = display.getWidth(); height_screen = display.getHeight();
But I do not know how to resize images to fit the user's screen resolution.
Can anyone help? Thanks..
source share