Providing unique layout for specific resolution in Android 2.3.3
Posted
by
user1384991
on Stack Overflow
See other posts from Stack Overflow
or by user1384991
Published on 2012-06-01T09:45:28Z
Indexed on
2012/06/01
10:40 UTC
Read the original article
Hit count: 194
android
|android-layout
I need to use specific xml-layouts based on screen resolution, not size. So, the first design is used for resolution <= 480x800, and the second - for resolution >= 480x800.
How is it done ?
update.
Possible solution:
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
final int height = display.getHeight();
final int width = display.getWidth();
© Stack Overflow or respective owner