Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Hi sir,
  how to set same resolution for all type of mobile in android. Kindly give me the solution for this problem.
Posted

It cannot be done.
Even if you implemented some scaling-method drawing your entire UI or game to a virtual canvas that was then scaled (up or down) to fit the screen you would still run into issues with aspect ratios being different.

/Fredrik
 
Share this answer
 
You can't do it - think about it for a moment, and you will see why: android runs on devices from 426x320 to 1920x1200 that I know of: if you try to use is as the same resolution on those two it will look terrible on both!

What are you trying to do that you think this would be a good idea?
 
Share this answer
 
I would say don't design for a specific resolution. Use combinations of layout_weight, layout_width and layout_height values of wrap_content and match_parent to get different proportional widths depending on the screen size, rather than hard coding pixel values. And also use "dp"(device-independent pixel), because it also changes slightly depending on the density, so that it stays a consistent physical size no matter what the resolution is.
And have a study with these:
Supporting Multiple Screens[^]
Which screen resolution should i consider while designing an android application[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900