1

I'm developing an Android application, but I'm a noob using it. I already know that I can make use of the .XML file to design the application's interface, but, by large amount of views that I have to configure inside of the .XML file, I decided to add the views programmatically, and all it's ok at this point.

My question is, can I know, NOT the size of the devices display, but the size of the area where the application is displayed?

If such thing it's not possible at all, at least can somebody explain me how can I do to make my application visible at all the screen (e.g. As happens when we open Adobe Reader for Android, covering even the notification bar, where the time is appreciated.)?

I've made use of the setFillViewPort() property for the ScrollView that contains a LinearLayout, and it holds inside all that you can see, but it does not work for covering all the display (as you can see, there's a blank space at the end).

Thank you very much.

Here's the current inteface of the application.

Link

Michael Irigoyen
  • 22,513
  • 17
  • 89
  • 131

2 Answers2

1

For hiding notification Bar you have to add this code in AndroidManifest.xml File

<application
...
    android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
...
</application>

you can get more info about this from, https://developer.android.com/training/system-ui/status.html

Sahil Garg
  • 263
  • 1
  • 20
0

Use this code.. this code give me the size of mobile screen in pixel.

// Get Display size for automatic animation
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
Pranav P
  • 1,755
  • 19
  • 39