• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Multiple Screen Support - Screen Width

moap

Newbie
Hi all,

I'm working on a game and got stuck with something. The whole scenario depends on the screen width and i developed the game on a 420 px width phone. I want to know whether or not i can force/change resolution, density or something to make phone screen width fit 420 px.
 
You cant change the resolution of the screen, but you can scale your graphics to fit the screensize. To read the screens size call something like this on the running activity:

Code:
screenX = getResources().getDisplayMetrics().widthPixels;
screenY = getResources().getDisplayMetrics().heightPixels;
 
Back
Top Bottom