Android - How To Get Screen Size
from http://stackoverflow.com/questions/2485697/getting-the-size-of-the-window-without-title-notification-bars
from http://stackoverflow.com/questions/2485697/getting-the-size-of-the-window-without-title-notification-bars
Use View.MeasureSpec.getSize method in onMeasure override.
| |||||
|
To accomplish this in my app, I had to find a View's dimensions within the main Activity. It looked something like this:
| ||||
I have a tutorial on my blog that give you the ability to save your screen size on launch, You can read it here: http://evgeni-shafran.blogspot.com/2011/01/android-screen-size-problem.html
Basicly you need to overide an onMeasure method of the first layout that hold you full screen, and get the width and height from there | ||||
have a look at getwidth() and getheight() maybe? that should give you the size of the screen. though, I don't know If it takes the bars or not. But I don't think so...
| |||||||||
|