Skip to content

Repository files navigation

GestureLock

自定义属性

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 圆形的个数 -->
<attrname="circleCount"format="integer" />
<!-- 圆的半径 -->
<attrname="circleRadius"format="dimension" />
<!-- 圆的间距 -->
<attrname="circleSpace"format="dimension" />
<!-- 正常状态下的圆的颜色 -->
<attrname="colorNormal"format="color" />
<!-- 选中状态下的圆的颜色 -->
<attrname="colorSelected"format="color" />
<!-- 圆的弧线宽度 -->
<attrname="strokeWidth"format="dimension" />
<declare-styleablename="GestureLockView">
<!-- 圆形的个数 -->
<attrname="circleCount" />
<!-- 圆的半径 -->
<attrname="circleRadius" />
<!-- 圆的间距 -->
<attrname="circleSpace" />
<!-- 正常状态下的圆的颜色 -->
<attrname="colorNormal" />
<!-- 选中状态下的圆的颜色 -->
<attrname="colorSelected" />
<!-- 正确状态下的圆的颜色 -->
<attrname="colorSelectedRight"format="color" />
<!-- 错误状态下的圆的颜色 -->
<attrname="colorError" />
<!-- 延时重置,单位毫秒 -->
<attrname="delayReset"format="integer" />
<!-- 是否显示手势路径 -->
<attrname="gesturePathVisible"format="boolean" />
<!-- 内圆的半径,默认为圆的半径的三分之一 -->
<attrname="innerCircleRadius"format="dimension" />
<!-- 圆的弧线宽度 -->
<attrname="strokeWidth"/>
</declare-styleable>
<declare-styleablename="GestureLockPreview">
<!-- 圆形的个数 -->
<attrname="circleCount" />
<!-- 圆的半径 -->
<attrname="circleRadius" />
<!-- 圆的间距 -->
<attrname="circleSpace" />
<!-- 正常状态下的圆的颜色 -->
<attrname="colorNormal" />
<!-- 选中状态下的圆的颜色 -->
<attrname="colorSelected" />
<!-- 圆的弧线宽度 -->
<attrname="strokeWidth"/>
</declare-styleable>
</resources>

默认样式

<?xml version="1.0" encoding="utf-8"?>
<resources>
<stylename="DefaultGestureLockView">
<itemname="circleCount">3</item>
<itemname="circleRadius">30dp</item>
<itemname="circleSpace">8dp</item>
<itemname="colorNormal">#7f7f7f</item>
<itemname="colorSelected">#209b54</item>
<itemname="colorSelectedRight">#209b54</item>
<itemname="colorError">#FF0000</item>
<itemname="gesturePathVisible">true</item>
<itemname="delayReset">1000</item>
<itemname="strokeWidth">1dp</item>
</style>
<stylename="DefaultGestureLockPreview">
<itemname="circleCount">3</item>
<itemname="circleSpace">8dp</item>
<itemname="colorNormal">#7f7f7f</item>
<itemname="colorSelected">#209b54</item>
<itemname="strokeWidth">1dp</item>
</style>
</resources>

屏幕截图

3x3样式

3x3_normal

3x3_wrong

3x3_right

4x4样式

4x4_normal

4x4_moving

4x4_wrong

4x4_right

About

Custom gesture lock widget

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages