MaterialPatternllockView material风格的图案解锁。
MaterialPatternllockView
- 类别: 手势交互 (Gesture)
- 打分: ★★★★★
- 更新: 2015-11-04 09:54
- 大小: 159 kb
- 开发环境: Android Studio
- 浏览: 622 次
- 下载: 157 次
- 项目地址: https://github.com/AmniX/MaterialPatternllockView
- 解锁
A View which is lookalike Lollipop Pattern View
介绍:
material风格的图案解锁。
运行效果:
使用说明:
首先导入项目中的materiallockview模块
然后
1
2
3
4
5
6
7
8
9
|
<com.amnix.materiallockview.MaterialLockView 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" />
|
回调
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/** * 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) {
}
}
|