A simple gesture password control and a simple gesture password control
GesturePasswordView
Recently, the project requires a gesture password, so I wrote it easily, so there is no difficulty or technical content to achieve it. I just don't have to repeat the wheel after posting it, and I also practiced writing a blog by the way.
Usage
1. Project gradle file:
allprojects {repositories {...maven { url 'https://jitpack.io' }}}
2. gradle file of the app:
dependencies {compile 'com.github.Thuantanon:GesturePasswordView:1.0'}
3. xml:
4. Code:
MPasswordView = findViewById (R. id. password_view); mPasswordView. setListener (new PasswordView. onFinishedListener () {@ Override public void selected (char ch) {// callback for each selected character} @ Override public void onResult (String password) {if (password. length () <4) {mPasswordView. setPasswordError (true );}}});
5. attribute values:
1. Verification Successful:
2. verification error: