Skip to Content
Android 9 Development Cookbook - Third Edition
book

Android 9 Development Cookbook - Third Edition

by Rick Boyer
October 2018
Intermediate to advanced
464 pages
15h 17m
English
Packt Publishing
Content preview from Android 9 Development Cookbook - Third Edition

How it works...

We call setSystemUiVisibility() with the appropriate flags in the showSystemUI() and hideSystemUI() methods to set the application window state. The flags we set (and don't set) control what is visible and what is hidden. When we set the visibility without the SYSTEM_UI_FLAG_IMMERSIVE flag, we in effect disable Immersive Mode.

If all we wanted to do was hide the System UI, we could just add hideSystemUI() to onCreate() and we'd be done. The problem is it wouldn't stay hidden. Once the user left Immersive Mode, it would stay in the regular display mode. That's why we created the GestureListener. (We'll discuss gestures again in Chapter 9Using the Touchscreen and Sensors.) Since we only want to respond to the onSingleTapUp() ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Android Application Development Cookbook - Second Edition

Android Application Development Cookbook - Second Edition

Rick Boyer, Kyle Mew
Android High Performance Programming

Android High Performance Programming

Enrique López Mañas, Diego Grancini
Android Things Projects

Android Things Projects

Francesco Azzola

Publisher Resources

ISBN: 9781788991216Supplemental Content