January 2014
Intermediate to advanced
736 pages
70h 43m
English
Figure 7.27 creates the SimpleOnGestureListener named singleTapListener, which was registered at lines 60–61(Fig. 7.22) with the GestureDetector. Recall that SimpleOnGestureListener is an adapter class that implements interfaces OnGestureListener and OnDoubleTapListener. The methods simply return false—indicating that the events were not handled. We override only the onSingleTap method (lines 146–155), which is called when the user taps the screen. We determine whether the system bars and app bar are displayed (lines 149–150) by calling method View method getSystemUiVisibilty and combining its result with the constant View.SYSTEM_UI_FLAG_HIDE_NAVIGATION. If the result is ...
Read now
Unlock full access