java - How to get the real display size in Android -


I try to get the dissection size (in Java-class) in Android. I used methods:

  display.getSize (size); Display.getRealSize (size);  

But a correct result for both the width comes back but the height is high, is there any suggestion, why do I get the wrong result? Try

Grace, Andre

:

 < Code> display meticode dm = getResources (). GetDisplayMetrics (); Int w = dm.widthPixels int h = dm.heightPixels  

Hope this helps.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -