Refactor gestures for Android compatibility