類似Lollipop+ Pattern lock的圖案鎖:MaterialPatternllockView
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. </ul>
<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) {
}
}
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!