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

mysql - How to enter php data into a html multiple select box -

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

c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -