I am currently developing my application for compatibility with the Samsung multi-window feature introduced in galaxy note 2 and soon in galaxy s3. If you do not know what I'm talking about: 
(source: androidheadlines.com )
If you're interested, here is a link to find out how to do this: here
My problem is that I need to know the height / width that my application uses. I'm doing it:
displaymetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); heightScreen = displaymetrics.heightPixels; widthScreen = displaymetrics.widthPixels;
But this returns the size of the entire screen, not just the part that my application uses. My activity consists only of Panel occupying all the space, but panel.getHeight () or getWidth () return 0.
How can I get the real height / width?
Thank you in advance.
source share