I'm looking for all sizes of the content area of each android size:
- QVGA (240x320)
- WQVGA400 (240x400)
- WQVGA432 (240x432)
- HVGA (320x480)
- WVGA800 (480x800)
- WVGA854 (480x854)
What I mea开发者_运维知识库n by "content area" is the screen without the notification bar. I couldn't find this information anywhere (either the content area sizes or the height of the notification bar).
While I could load all size in the emulator and calculate the size for each screen, I'm sure somebody else has already done it. :)
Okay, so you got a list of all 10 (?) different sizes and write a handler for each one in your app.
Oh snap, Samsola made a new phone with a 823x584 resolution. Your app just broke!
Oh no! Cyanofonso made a custom ROM that has a new theme where the title bar is 2 pixels larger. Your app just broke!
To reiterate - whatever you're trying to do, don't do it. Either get the size at run-time, or (preferably) use dpi to make your app work on every possible device.
There is not a set size for the notification bar. Your best bet is to have a layout with height=fill_parent then take the height of that layout to do your calculations. That will give the content area only.
LinearLayout layout = (LinearLayout)findViewById(R.id.main);
int height= layout.getHeight();
You have the content sizes listed in your question unless i'm misunderstanding you. Perhaps this link will help you. http://developer.android.com/guide/practices/screens_support.html
精彩评论