diff --git a/README.md b/README.md index 0a7ccd3..17f5789 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@

-# 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? @@ -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: ``` @@ -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 diff --git a/README_ch.md b/README_ch.md index 1642167..fdbce62 100644 --- a/README_ch.md +++ b/README_ch.md @@ -4,7 +4,8 @@

-# 滑动确认组件 [ ![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 平台 @@ -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`, 比如: ``` @@ -93,6 +94,10 @@ | completed_text_font | 滑动成功之后的提示文字的字体样式, 需要放到 `res/font` 目录下 | @font/你的字体资源文件 | +### 可能用的到的 API +1. `SlideToConfirm.setSlideListener(new ISlideListener() { ... });` 当需要监听滑动状态的时候用这个。比如开始滑动 、 正在滑动、松手取消 、 松手完成 这些事件均在这个接口中提供了回调方法。 +2. `SlideToConfirm.reset();` 当需要在已经完成的状态下重置组件状态的时候,调用这个方法。 + ------ License: MIT