Hi,
I am trying to figure out the screen size I will have in portrait and in 
landscape at the beginning of my app.
I can get the real display size using Display.getRealSize() and then 
calculate the navigation bar height in case there is one.
However, in devices with 600dp or less the navigation bar can have 
different heights (depending on orientation) and may even move to the right 
in landscape mode.
My app would needs to know these paramters when it begins (the app is 
connected to a cloud server that receives these dimensions when it connects 
- so I really need to know these before the app starts doing things).

My current solution is this:
        id = res.getIdentifier("navigation_bar_height", "dimen", "android");
        int navigation_bar_height = res.getDimensionPixelSize(id);

Although this works, it is never a good practice to use android's internal 
resources.
Is there any other way of knowing the dimensions of the screen in a 
different orientation BEFORE you rotate the device?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to