To introduce a very useful third-party gesture to unlock the control shaplelocker, not much nonsense first on:
You can replace the icons yourself according to your UI needs: circles, small arrows, etc...
GitHub Address:
http://panespanes.github.io/ShapeLocker/
The usage is simple, first add the dependency in the Gradle:
In the Build.gradle of the project (project, not module), Respositories's last plus a row references Jitpack's MAVEN warehouse address
allprojects { repositories { ... Maven {URL "Https://jitpack.io"} } }
Then add the dependencies in the build.grade that you need to use for the control's module:
dependencies { compile ' com.github.panespanes:shapelocker:v1.0.4 ' }
Start using it now!
Adding Shapelocker controls in Layout.xml
<com.panes.shapelocker.view.shapelocker android:layout_width= "match_parent" android:layout_height= " Match_parent " android:background=" @android: Color/darker_gray " > </ Com.panes.shapelocker.view.shapelocker>
OK, let's run for a look at the effect ~
--------
Tips
XML inside
Android:background= "@android: Color/darker_gray"
is actually the background color of the control, of course, you can also change your favorite color ~
--------
Personalize your settings
Shapelocker provides a configuration class that can apply some of the built-in themes:
Shapelockerproperties.with (Mcontext). Loadlighttheme ();
Of course, you can write this: the effect is the same
Shapelocker SL = (shapelocker) Findviewbyid (R.ID.SL); Sl.loadlighttheme ();
Currently only the default Lighttheme, the color scheme is
Inactive: Small white dot
Activation Status: Green Circle
Error Status: Red circle
Correct status: Green Circle
will consider adding more and better-looking themes in the future ~
The Shapelocker class also provides a set method to customize the various icons described above, leaving you to explore it yourself ~
Android gestures Unlocked