Reputation: 8512
I'm looking for all sizes of the content area of each android size:
What I mean 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. :)
Upvotes: 1
Views: 624
Reputation: 3108
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();
Upvotes: 1
Reputation: 77742
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.
Upvotes: 8
Reputation: 1891
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
Upvotes: 1