Wednesday, February 26, 2014

How to get real screen pixel resolution


metric.densityDpi not get accurate data such as millet is he got was 320 342<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Android system only divided ldpi mdpi tvdpi hdpi xhdpi xxhdpi so few files so only to the appropriate screen density
You want this exact meaning of what the screen density?

Reply:
cited a floor CuGBabyBeaR reply:
Android system only divided ldpi mdpi tvdpi hdpi xhdpi xxhdpi so few files so only to the appropriate screen density values ​​
You want this exact meaning of what the screen density?

The same question, to the exact pixel density What is the use?
android only gave these files, the screen pixel density is obtained, if necessary to obtain px, is another method should be similar getWidth () and the like, previously used
Reply:
densityDpi is only a reference, can not so much resolution is exactly equal to these values.
If you want to get a resolution, android.view.Display there are many methods.
Reply:
Get access to px px
Reply:
Useful if you want to do every game UI controls no matter what the physical size of the screen, the position is fully consistent with the real screen density can be translated to

No comments:

Post a Comment