36.12 Registering the Event Listener
In order for the activity to receive notification that the user has performed a gesture on the screen, it is necessary to register the OnGesturePerformedListener event listener as outlined in the following code fragment:
private fun gestureSetup() {
gLibrary = GestureLibraries.fromRawResource(this,
R.raw.gesture)
if (gLibrary?.load() == false) {
finish()
}
gOverlay.addOnGesturePerformedListener(this)
}