O'Reilly logo

Android App Development by Franceschi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

APPENDIX A: Retrieving the Height of the Status Bar and the Action Bar Dynamically

Chapter opener image: © Fon_nongkran/Shutterstock

If we define a View programmatically, we often need to retrieve the height of the content view, which is the total height of the screen minus the heights of the status bar and the action bar.

FIGURE A.1 shows the various parts of a device’s screen. The device’s status bar is shown in yellow: it typically includes some icons for system and application notifications, including the clock. In red is the app’s action bar, which typically includes the app name on the top left and a menu on the right, although it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required