Is there a better way to implement a GestureDetetor to all activities instead of having to define a GestureDetector individually?
In my scenario I have 10 activities for which I would like all of them to have the same behavior for Gestures. For example a swipe to the right will end the current activity and take the user back to the main activity.
My options seem to be
- Define the GestureDetector in each of my 10 activities
or - Extend Activity and add a GestureDetector there and then extend from my custom activity.
Is there a better way to implement this behavior?