aspose file tools*
The moose likes Android and the fly likes Effective screen size of application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Effective screen size of application" Watch "Effective screen size of application" New topic
Author

Effective screen size of application

Ksh Aggarwal
Greenhorn

Joined: Sep 16, 2009
Posts: 28
What is the effective screen available (Height) for an application without removing any default bars on the top.

480 - (both bars at the top) = ?
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

Ran this under default emulator settings(320 x 480 HVGA):

I created an Activity that had only one custom View with Height and Width as "fill_parent". The Activity had both the default title bars;

I printed View#getHeight() and View#getWidth() inside onDraw of the View and got following values for Height and Width:
H: 430
W: 320

I get same values on Hero too. So, IMO that's the answer you want.


[List of FAQs] | [Android FAQ] | [Samuh Varta]
Ksh Aggarwal
Greenhorn

Joined: Sep 16, 2009
Posts: 28
Monu Tripathi wrote:Ran this under default emulator settings(320 x 480 HVGA):

I created an Activity that had only one custom View with Height and Width as "fill_parent". The Activity had both the default title bars;

I printed View#getHeight() and View#getWidth() inside onDraw of the View and got following values for Height and Width:
H: 430
W: 320

I get same values on Hero too. So, IMO that's the answer you want.



Thanks Monu
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

You're welcome!

[Glad to see that you marked this thread as resolved; not many do that. I guess, it will take some time getting used to]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Effective screen size of application