Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Kunstmaan Shaker Menu

Features

  • shake your phone to show a menu with custom entries

Example project integrating this in the Android build process can be found here

Installation

in the build.gradle of your app, put:

implementation 'be.kunstmaan.android:kunstmaan-shaker-menu:1.0.0'
// implementationDebug if needed only for debugging purposes

Usage

  • initialize ShakerMenu:

In your Application class add the following:

new KunstmaanShakerMenu.Builder(application)
    .setTitle("My menu")
    .setSensitivity(KunstmaanShakerMenu.Sensitivity.LIGHT)
    .addItem("Title A", new Runnable() {
                        @Override
                        public void run() {
                            // put your code here
                        }
                    })
    .addItem("Title B", new Runnable() {
                        @Override
                        public void run() {
                            // put your code here
                        }
                    })
    .build();

Credits

https://github.com/square/seismic is used for the shaking detection, in compliance with the Apache License, Version 2.0.

About

A small library to show a menu on Android by shaking your phone

Resources

License

Packages

No packages published

Languages