Pattern Lock View
Awesome pattern lock view for android written in kotlin.
Features
- easy to use
- beautiful built-in styles
- fully customizable
- tiny size around 35 KB
Preview
Usage
Gradle
Top level build file:
In your application build file:
XML
Kotlin
Java
Customization
Built-in Styles
style="@style/PatternLockView.JDStyle"
style="@style/PatternLockView.WithIndicator"
Custom Attributes
name | format | default value | description |
---|---|---|---|
plv_regularCellBackground | color|reference | null | |
plv_regularDotColor | color | #d8dbe9 | |
plv_regularDotRadiusRatio | float | 0.3 | |
plv_selectedCellBackground | color|reference | null | |
plv_selectedDotColor | color | #587bf4 | |
plv_selectedDotRadiusRatio | float | 0.3 | |
plv_errorCellBackground | color|reference | null | |
plv_errorDotColor | color | #ea4954 | |
plv_errorDotRadiusRatio | float | 0.3 | |
plv_lineStyle | enum | common | two values: common, indicator |
plv_lineWidth | dimension | 2dp | |
plv_regularLineColor | color | #587bf4 | |
plv_errorLineColor | color | #ea4954 | |
plv_spacing | dimension | 24dp | |
plv_rowCount | integer | 3 | |
plv_columnCount | integer | 3 | |
plv_errorDuration | integer | 400 | millisecond |
plv_hitAreaPaddingRatio | float | 0.2 | |
plv_indicatorSizeRatio | float | 0.2 |
Secure Mode
You can turn the secure mode on or off via call enableSecureMode()
and disableSecureMode()
.