SimpleFingerGestures


Source link: https://github.com/championswimmer/SimpleFingerGestures_Android_Library

SimpleFingerGestures

An android library to implement simple 1 or 2 finger gestures easily

Example


Library

The library is inside the libSFG folder

Sample App

The sample App is inside the sample folder

Implementing SimpleFingerGestures

  1. Create an object of class SimpleFingerGestures
private SimpleFingerGestures mySfg = new SimpleFingerGestures();
  1. Implement the required gestures via this object
mySfg.setOnFingerGestureListener(new SimpleFingerGestures.OnFingerGestureListener() {

 @Override

 public boolean onSwipeUp(int fingers, long gestureDuration, double gestureDistance) {

  grtv.setText("swiped " + fingers + " up");

  return false;

 
}

  @Override

 public boolean onSwipeDown(int fingers, long gestureDuration, double gestureDistance) {

  grtv.setText("swiped " + fingers + " down");

  return false;

 
}

  @Override

 public boolean onSwipeLeft(int fingers, long gestureDuration, double gestureDistance) {

  grtv.setText("swiped " + fingers + " left");

  return false;

 
}

  @Override

 public boolean onSwipeRight(int fingers, long gestureDuration, double gestureDistance) {

  grtv.setText("swiped " + fingers + " right");

  return false;

 
}

  @Override

 public boolean onPinch(int fingers, long gestureDuration, double gestureDistance) {

  grtv.setText("pinch");

  return false;

 
}

  @Override

 public boolean onUnpinch(int fingers, long gestureDuration, double gestureDistance) {

  grtv.setText("unpinch");

  return false;

 
}

  @Override

 public boolean onDoubleTap(int fingers) {

  return false;

 
}

}
);
  1. And finally set this object onto your view's OnTouchListener

    myView.setOnTouchListener(mySfg);
     

    This can be set as the OnTouchListener of any object that is derived from android.view.View

How to add to your project

The easiest way to add to your project is the download the latest zip from the Releases tab. Inside you'll find a compiled library in .jar format that you can just drop in to the libs folder of your Android app project for it to get automatically added as a library

Also you can add it using jitpack maven distribution.
Add the jitpack maven repository

 repositories {

jcenter()

maven {

 url "https://jitpack.io"

}

  
}

Add the dependency

dependencies {

 compile 'in.championswimmer:SimpleFingerGestures_Android_Library:1.2'  
}

Documentation

Find documentation at

http://championswimmer.github.io/SimpleFingerGestures_Android_Library/documentation

Resources

Bluetooth chat app written purely in Kotlin.

Autocomplete adds simple yet powerful autocomplete behavior to EditTexts, to avoid working with the infamous MultiAutoCompleteTextView APIs.

Features

  • Define a AutocompletePolicy to listen to text events
  • Popup is automatically shown
  • Query text passed to AutocompletePresenter
  • List shown in a recycler view
  • Built in support for @usernames, #hashtags and similar

Simple library to apply custom font in android text: TextView, EdiText and Button.

It is an example to implement an Horizontal picker with the Leftmost element selected.

A simple, material design multi-contact picker using RecyclerView and Alphabetical Fast Scrolling! The picker will read the device contacts (REMEMBER: Runtime permissions for retrieving contacts) and allow you to select 1-many and return them in a convenient list. Great for apps that wish to allow users to import from their contacts and/or invite their friends all at once.

Note: The contacts will always have the first letter gmail-style avatars, contact photos are not used at this time.

Clean Architecture with Dagger2 + Retrofit2 + Picasso.

This repo contains demo module which retrieves characters from Star wars API.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes