Skip to content

Commit

Permalink
升级构建
Browse files Browse the repository at this point in the history
  • Loading branch information
TakWolf committed Feb 4, 2025
1 parent 7953ce5 commit f50154a
Show file tree
Hide file tree
Showing 81 changed files with 754 additions and 883 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
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
147 changes: 21 additions & 126 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
# Created by https://www.gitignore.io/api/android,intellij,osx,windows,linux

### Android ###
# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
# https://github.com/github/gitignore/blob/main/Android.gitignore

# Gradle files
.gradle/
Expand All @@ -22,122 +7,32 @@ build/
# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
# Log/OS Files
*.log

# Android Studio Navigation editor temp files
.navigation/

### Android Patch ###
gen-external-apklibs


### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties


### OSX ###
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

### Linux ###
*~
# Google Services (e.g. APIs or Firebase)
google-services.json

# KDE directory preferences
.directory
# Android Profiling
*.hprof

# Linux trash folder which might appear on any partition or disk
.Trash-*
# Kotlin
.kotlin/
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
96 changes: 29 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
# Android Lock9View #
# Android - Lock9View

[![Build Status](https://travis-ci.org/TakWolf/Android-Lock9View.svg?branch=master)](https://travis-ci.org/TakWolf/Android-Lock9View)
[![Bintray](https://api.bintray.com/packages/takwolf/maven/Android-Lock9View/images/download.svg)](https://bintray.com/takwolf/maven/Android-Lock9View/_latestVersion)
[![Platform](https://img.shields.io/badge/platform-Android-green.svg)](https://www.android.com)
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg)](https://android-arsenal.com/api?level=14)
[![License](https://img.shields.io/github/license/TakWolf/Android-Lock9View.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android--Lock9View-brightgreen.svg)](http://android-arsenal.com/details/1/1704)
[![Platform](https://img.shields.io/badge/platform-Android-brightgreen)](https://developer.android.com)
[![API](https://img.shields.io/badge/API-21%2B-brightgreen)](https://android-arsenal.com/api?level=21)
[![License](https://img.shields.io/github/license/TakWolf/Android-Lock9View)](https://www.apache.org/licenses/LICENSE-2.0)
[![JitPack](https://jitpack.io/v/TakWolf/Android-Lock9View.svg)](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

![Screenshot](art/screenshot.png)
![Screenshot](docs/screenshot.png)

## Demo ##
## Usage

[![Google Play Store](art/git_it_on_google_play.png)](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"
Expand All @@ -45,12 +43,12 @@ implementation 'com.takwolf.android:lock9view:0.1.3'
app:lock9_vibrateTime="20" />
```

![layout_1](art/layout_1.png)
![layout_1](docs/layout_1.png)

### 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"
Expand All @@ -68,15 +66,15 @@ implementation 'com.takwolf.android:lock9view:0.1.3'
app:lock9_vibrateTime="20" />
```

![layout_2](art/layout_2.png)
![layout_2](docs/layout_2.png)

**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 :

Expand All @@ -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

![auto_link](art/auto_link.png)
![auto_link](docs/auto_link.png)

```
app:lock9_autoLink="true" // default is false
```

### Vibrate ###
### Vibrate

```
app:lock9_enableVibrate="true" // default is false
Expand All @@ -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);
Expand All @@ -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
Expand Down
Loading

0 comments on commit f50154a

Please sign in to comment.