Skip to content

t-gao/AndroidPatternLock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AndroidPatternLock

An Android library with the implementation of the pattern lock screen.

Android 手势密码view.

Some encryption methods are provided: MD5/SHA-1/SHA-256.

  • How to use:

    1. Add this project to be your own project's library project.

    2. Use the LockView in you layout xml file, as below:

            <com.tg.androidpatternlock.LockView
            android:id="@+id/lockview"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            />
    1. In your activity:

      Make these calls:

      
           mLockView = (LockView) findViewById(R.id.lockview);
           mLockView.setPatternListener();
           mLockView.setPatternPasswordStorageFetcher();
           mLockView.setWorkMode();
       

      There are two work modes, creating and input, which respectively should be used when user is creating or inputing pattern password.

      Below calls are optional:

      
           mLockView.setSkipPolicy(LockView.SkipPolicy_AutoConnect);
           mLockView.setPathColorCorrect(getResources().getColor(R.color.some_color));
           mLockView.setCircleColorNormal(getResources().getColor(R.color.some_color));
           mLockView.setCircleColorCorrect(getResources().getColor(R.color.some_color));
           mLockView.setUiStyle(LockView.UiStyle_Circle);
       

  • Screen shots:

    Creating mode Inputing mode
    Alt text Alt text

About

An Android pattern lock library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages