views:

38

answers:

2

How can I know the visible size of my activity?

I'm trying to get the Activity real size,
not the height and width from getHeight() and getWidth(),
which gives me the screen full size.

+2  A: 

I think you'll want to look at Activity.getWindow() and Window.getDecorView(), and get the width/height of that.

Dave
+1  A: 

I've found a way to know the exact height of my activity.

If you have a view filling all the available screen
behind the title bar and the task bar,
just use getBottom()
to get the real height of that activity.

Solved.

Tsimmi