-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
754 additions
and
883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "temurin" | ||
- name: Build with Gradle | ||
run: ./gradlew build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
# Android Lock9View # | ||
# Android - Lock9View | ||
|
||
[](https://travis-ci.org/TakWolf/Android-Lock9View) | ||
[](https://bintray.com/takwolf/maven/Android-Lock9View/_latestVersion) | ||
[](https://www.android.com) | ||
[](https://android-arsenal.com/api?level=14) | ||
[](http://www.apache.org/licenses/LICENSE-2.0) | ||
[](http://android-arsenal.com/details/1/1704) | ||
[](https://developer.android.com) | ||
[](https://android-arsenal.com/api?level=21) | ||
[](https://www.apache.org/licenses/LICENSE-2.0) | ||
[](https://jitpack.io/#TakWolf/Android-Lock9View) | ||
|
||
An Android grid lock screen view with a callback interface. | ||
A nine grid lock screen view for Android. | ||
|
||
## ScreenShot ## | ||
## Screenshot | ||
|
||
 | ||
 | ||
|
||
## Demo ## | ||
## Usage | ||
|
||
[](https://play.google.com/store/apps/details?id=com.takwolf.android.lock9) | ||
```kotlin | ||
repositories { | ||
maven { setUrl("https://jitpack.io") } | ||
} | ||
|
||
## Usage ## | ||
|
||
### Gradle ### | ||
|
||
``` gradle | ||
implementation 'com.takwolf.android:lock9view:0.1.3' | ||
dependencies { | ||
implementation("com.github.TakWolf:Android-Lock9View:0.0.0") | ||
} | ||
``` | ||
|
||
### Layout example 1 ### | ||
### Layout Example 1 | ||
|
||
``` xml | ||
<com.takwolf.android.lock9.Lock9View | ||
<com.takwolf.android.lock9view.Lock9View | ||
android:id="@+id/lock_9_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
|
@@ -45,12 +43,12 @@ implementation 'com.takwolf.android:lock9view:0.1.3' | |
app:lock9_vibrateTime="20" /> | ||
``` | ||
|
||
 | ||
 | ||
|
||
### Layout example 2 ### | ||
### Layout Example 2 | ||
|
||
``` xml | ||
<com.takwolf.android.lock9.Lock9View | ||
<com.takwolf.android.lock9view.Lock9View | ||
android:id="@+id/lock_9_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
|
@@ -68,15 +66,15 @@ implementation 'com.takwolf.android:lock9view:0.1.3' | |
app:lock9_vibrateTime="20" /> | ||
``` | ||
|
||
 | ||
 | ||
|
||
**PS :** | ||
|
||
**If use *"lock9_nodeSize"* , it will ignore *"lock9_padding"* and *"lock9_spacing"*.** | ||
|
||
**The nodes will be layout on the center of 9 average areas.** | ||
|
||
### Touch area ### | ||
### Touch Area | ||
|
||
If you want to draw a small node with a bigger touch area, please user : | ||
|
||
|
@@ -86,21 +84,21 @@ app:lock9_nodeAreaExpand="24dp" // default is 0 | |
|
||
touchArea = lock9_nodeSize + lock9_nodeAreaExpand * 2 | ||
|
||
### Animation ### | ||
### Animation | ||
|
||
``` | ||
app:lock9_nodeOnAnim="@anim/node_on_2" | ||
``` | ||
|
||
### AutoLink ### | ||
### AutoLink | ||
|
||
 | ||
 | ||
|
||
``` | ||
app:lock9_autoLink="true" // default is false | ||
``` | ||
|
||
### Vibrate ### | ||
### Vibrate | ||
|
||
``` | ||
app:lock9_enableVibrate="true" // default is false | ||
|
@@ -113,7 +111,7 @@ Also need : | |
<uses-permission android:name="android.permission.VIBRATE" /> | ||
``` | ||
|
||
### Activity ### | ||
### Activity | ||
|
||
``` java | ||
Lock9View lock9View = (Lock9View) findViewById(R.id.lock_9_view); | ||
|
@@ -132,43 +130,7 @@ lock9View.setGestureCallback(new Lock9View.GestureCallback() { | |
}); | ||
``` | ||
|
||
## Change Log ## | ||
|
||
### 0.1.0 ### | ||
|
||
- This is a broken api version. | ||
|
||
- Extend gesture callback. | ||
|
||
## Limitations ## | ||
|
||
这个项目很长时间出于非活跃状态,主要是手势解锁布局实现上存在一些限制。 | ||
|
||
一个完整的手势解锁布局,应该包括的功能有: | ||
|
||
- 基本的手势连线 | ||
|
||
- 连接节点的动画 | ||
|
||
- 不同情况下的状态以及样式(常规、正确、错误状态时节点和连线颜色,以及停留时间) | ||
|
||
- 布局策略(节点数量、触摸范围、连线和结点的层级关系) | ||
|
||
- 反馈(连接节点时显示涟漪效果或者声音提示或者震动反馈) | ||
|
||
我目前没有找到一个好的方法能够完美并且优雅的实现上面所有功能的扩展。 | ||
|
||
自己的几个关于手势解锁需求的项目,都是在这个基础上做了 UI 上的定制化修改。 | ||
|
||
## Author ## | ||
|
||
TakWolf | ||
|
||
[[email protected]](mailto:[email protected]) | ||
|
||
[http://takwolf.com](http://takwolf.com) | ||
|
||
## License ## | ||
## License | ||
|
||
``` | ||
Copyright 2014 TakWolf | ||
|
Oops, something went wrong.