Coder Social home page Coder Social logo

java-alphamu-android-gestures-tutorial's Introduction

Android Gestures Tutorial

Most applications tend to only listen for a simple touch gesture, perhaps the odd app with listen for a swipe or fling... what if you had an application that in a single view had to handle (for example) all the following views.

  • Tap
  • Double Tap
  • 2 finger Tap
  • 2 finger double tap
  • 3 finger tap
  • Pinch
  • 1 finger down, second finger tap.
  • 1 finger scroll (dragging and fling)
  • 2 finger scroll (dragging and fling)
  • 3 finger scroll (dragging and fling)
  • tap and a half (basically tap, then finger down again)

That right, what if you wanted to emulate all the gesture of a touch-pad on your android screen? Google does provide some classes that you can use but they only handle frequently used gestures. Google provides a demo on complex gesture handling but this only allows you to create a database of gestures (with just one finger) and match against it. A lot of the 2 and 3 finger taps and gestures are not catered for.

How to detect 1 finger, 2 finger and pinch scroll

Explanation of the code on how to detect one finger, two finger and pinch can be found on my blog in the article Android: Detecting a Pinch Gesture.

java-alphamu-android-gestures-tutorial's People

Contributors

alphamu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.