Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chinalwb committed Jun 30, 2020
2 parents 9b8369e + 4eac8be commit 111e57e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
</p>


# Slide to confirm [ ![Download](https://api.bintray.com/packages/chinalwb/slidetoconfirm/slidetoconfirm/images/download.svg?version=1.0.1) ](https://bintray.com/chinalwb/slidetoconfirm/slidetoconfirm/1.0.1/link)
# Slide to confirm [ ![Download](https://api.bintray.com/packages/chinalwb/slidetoconfirm/slidetoconfirm/images/download.svg) ](https://bintray.com/chinalwb/slidetoconfirm/slidetoconfirm/_latestVersion)


### [中文说明](./README_ch.md)
### What's this?
Expand Down Expand Up @@ -36,7 +37,7 @@

### How to use?
- Two steps:
1. Add `implementation 'com.github.chinalwb:slidetoconfirm:1.0.1'` in your build.gradle
1. Add `implementation 'com.github.chinalwb:slidetoconfirm:1.0.2'` in your build.gradle
2. Include `com.chinalwb.slidetoconfirmlib.SlideToConfirm` whenever necessary, for example:
```
Expand Down Expand Up @@ -94,6 +95,11 @@
| completed_text_font | The text font of the completed text, in `res/font` folder | @font/your_font |


### APIs I may need

1. `SlideToConfirm.setSlideListener(new ISlideListener() { ... })`; Use this when you want to detect the slider is start dragging (action down) / in dragging (action move) / cancel (action up) / done (action up when at the right end)
2. `SlideToConfirm.reset()`; Use this when you want to reset the slider to initial state after it has been in completed state

------
License: MIT

Expand Down
9 changes: 7 additions & 2 deletions README_ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
</p>


# 滑动确认组件 [ ![Download](https://api.bintray.com/packages/chinalwb/slidetoconfirm/slidetoconfirm/images/download.svg?version=1.0.1) ](https://bintray.com/chinalwb/slidetoconfirm/slidetoconfirm/1.0.1/link)
# 滑动确认组件 [ ![Download](https://api.bintray.com/packages/chinalwb/slidetoconfirm/slidetoconfirm/images/download.svg) ](https://bintray.com/chinalwb/slidetoconfirm/slidetoconfirm/_latestVersion)

### 这是什么?
- 当你的 App 需要用户滑动来确认某些信息的时候,可以使用这个滑动确认组件
- 适用 Android 平台
Expand Down Expand Up @@ -35,7 +36,7 @@

### 如何使用?
- 简单两步:
1. 在 build.gradle 中加依赖 `implementation 'com.github.chinalwb:slidetoconfirm:1.0.1'`
1. 在 build.gradle 中加依赖 `implementation 'com.github.chinalwb:slidetoconfirm:1.0.2'`
2. 然后在需要的地方引用 `com.chinalwb.slidetoconfirmlib.SlideToConfirm`, 比如:
```
Expand Down Expand Up @@ -93,6 +94,10 @@
| completed_text_font | 滑动成功之后的提示文字的字体样式, 需要放到 `res/font` 目录下 | @font/你的字体资源文件 |


### 可能用的到的 API
1. `SlideToConfirm.setSlideListener(new ISlideListener() { ... });` 当需要监听滑动状态的时候用这个。比如开始滑动 、 正在滑动、松手取消 、 松手完成 这些事件均在这个接口中提供了回调方法。
2. `SlideToConfirm.reset();` 当需要在已经完成的状态下重置组件状态的时候,调用这个方法。

------
License: MIT

Expand Down

0 comments on commit 111e57e

Please sign in to comment.