I'm building an app with a Pentec device, and the screen resolution is 480x800 But I want to set the resolution of the G1 device I think if you change the pixels to dp, the two devices can provide the same screen Can you change the pixel to dp?
android dpi pixel resolution
Resources r = getResources();
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14, r.getDisplayMetrics());
© 2024 OneMinuteCode. All rights reserved.