类似Lollipop+ Pattern lock的图案锁:MaterialPatternllockView
jopen
9年前
Material Pattern Lockview是一个灵感源于Lollipop+ Pattern lock的图案锁。主要特性:
- Ditto AOSP Pattern Lock LookAlike
- WIP JavaDocs
- StelthMode
- Simple and CellList Callback
- Diffrent and customizable Colors.
- More and More things to come.
<com.amnix.materiallockview.MaterialLockView xmlns:lockview="http://schemas.android.com/apk/res-auto" android:id="@+id/pattern" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" lockview:LOCK_COLOR="#fff" lockview:WRONG_COLOR="#ff0000" lockview:CORRECT_COLOR="#00ff00"/>使用以下类来取得一个调用
/** * The call back abstract class for detecting patterns entered by the user. */ public static abstract class OnPatternListener { /** * A new pattern has begun. */ public void onPatternStart() { } /** * The pattern was cleared. */ public void onPatternCleared() { } /** * The user extended the pattern currently being drawn by one cell. * * @param pattern The pattern with newly added cell. */ public void onPatternCellAdded(List<Cell> pattern, String SimplePattern) { } /** * A pattern was detected from the user. * * @param pattern The pattern. */ public void onPatternDetected(List<Cell> pattern, String SimplePattern) { } }