Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
warkiz committed Sep 2, 2018
1 parent b73229f commit 7422d74
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 22 deletions.
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IndicatorSeekBar

[![DOWNLOAD](https://api.bintray.com/packages/warkiz/maven/indicatorseekbar/images/download.svg)](https://bintray.com/warkiz/maven/indicatorseekbar/_latestVersion)
[![DOWNLOAD](https://api.bintray.com/packages/warkiz/maven/indicatorseekBar/images/download.svg)](https://bintray.com/warkiz/maven/indicatorseekBar/_latestVersion)
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-IndicatorSeekBar-green.svg?style=flat )]( https://android-arsenal.com/details/1/6434 )

Expand All @@ -22,7 +22,7 @@ This is a customizable SeekBar library on Android. Also, If you don't need indic
## Setup

```gradle
implementation 'com.github.warkiz.widget:indicatorseekbar:2.0.9'
implementation 'com.github.warkiz.widget:indicatorseekBar:2.1.0'
```

## Usage
Expand Down Expand Up @@ -59,7 +59,7 @@ implementation 'com.github.warkiz.widget:indicatorseekbar:2.0.9'

```Java

IndicatorSeekBar seekbar = IndicatorSeekBar
IndicatorSeekBar seekBar = IndicatorSeekBar
.with(getContext())
.max(110)
.min(10)
Expand Down Expand Up @@ -110,15 +110,28 @@ By the way, make sure you had called the attr to show the indicator before.
#### Java

```Java
IndicatorSeekBar seekbar = IndicatorSeekBar
IndicatorSeekBar seekBar = IndicatorSeekBar
.with(getContext())
.max(50)
.min(10)
.showIndicatorType(IndicatorType.RECTANGLE) //show indicator can not be NONE
...
.build();

new IndicatorStayLayout(getContext()).attachTo(seekbar);
new IndicatorStayLayout(getContext()).attachTo(seekBar);
```

## Custom indicator's View

You can custom the indicator View by below way:
1.if you want to replace the indicator's View on top part, you can call:
```Java
seekBar.getIndicator().setTopContentView(yourTopView);
```

2.if you want to custom the indicator's View you want , you can call:
```Java
seekBar.getIndicator().setContentView(yourView);
```

## Custom indicator's text
Expand All @@ -128,14 +141,13 @@ For example:
If you want to show the progress with suffix: `%` ,the code like:

```Java
seekbar.setIndicatorTextFormat("${PROGRESS} %")
seekBar.setIndicatorTextFormat("${PROGRESS} %")
```

or want to show the tick text with prefix: `I am` ,the code like:

```Java
seekbar.setIndicatorTextFormat("I am ${TICK_TEXT}")
```
seekBar.setIndicatorTextFormat("I am ${TICK_TEXT}")

## Custom section tracks color
The color of every block of seek bar can also be custom.
Expand Down Expand Up @@ -247,19 +259,22 @@ seekBar.setOnSeekChangeListener(new OnSeekChangeListener() {

## Attributes

[ attr.xml ](https://github.com/warkiz/IndicatorSeekBar/blob/master/indicatorseekbar/src/main/res/values/attr.xml)
[ attr.xml ](https://github.com/warkiz/IndicatorSeekBar/blob/master/indicatorseekBar/src/main/res/values/attr.xml)

## Support & Contact me

Star to support me , many thanks!
## Contact me

Feel free to contact me if you have any trouble on this project:
1. Create an issue.
2. Send mail to me, "warkiz".concat("4j").concat("@").concat("gmail.com")

## Buy me a coffee

Buy me a coffee by Alipay or WeChatPay, thanks
<img src="https://github.com/warkiz/IndicatorSeekBar/blob/master/app/src/main/res/mipmap-xxhdpi/alipay.png?raw=true" width = "400" height = "606"/>
<img src="https://github.com/warkiz/IndicatorSeekBar/blob/master/app/src/main/res/mipmap-xxhdpi/wechat_pay.png?raw=true" width = "441" height = "606"/>
## License

Copyright (C) 2017 zhuangguangquan warkiz
Copyright (C) 2017 zhuangguangquan(庄广权)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 10 additions & 6 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
## 初始化

```gradle
implementation 'com.github.warkiz.widget:indicatorseekbar:2.0.9'
implementation 'com.github.warkiz.widget:indicatorseekbar:2.1.0'
```

## 使用
Expand Down Expand Up @@ -247,17 +247,20 @@ seekBar.setOnSeekChangeListener(new OnSeekChangeListener() {

[ attr.xml ](https://github.com/warkiz/IndicatorSeekBar/blob/master/indicatorseekbar/src/main/res/values/attr.xml)

## 支持 & 联系我

Star to support me , many thanks!
## 联系我

Feel free to contact me if you have any trouble on this project:
1. Create an issue.
2. Send mail to me, "warkiz".concat("4j").concat("@").concat("gmail.com")

## 许可
## Buy me a coffee

Buy me a coffee by Alipay or WeChatPay, thanks
<img src="https://github.com/warkiz/IndicatorSeekBar/blob/master/app/src/main/res/mipmap-xxhdpi/alipay.png?raw=true" width = "400" height = "606"/>
<img src="https://github.com/warkiz/IndicatorSeekBar/blob/master/app/src/main/res/mipmap-xxhdpi/wechat_pay.png?raw=true" width = "441" height = "606"/>
## 证书

Copyright (C) 2017 zhuangguangquan warkiz
Copyright (C) 2017 zhuangguangquan(庄广权)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -270,3 +273,4 @@ Feel free to contact me if you have any trouble on this project:
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.warkiz.indicatorseekbar"
minSdkVersion 23
minSdkVersion 24
targetSdkVersion 27
versionCode 3
versionName "2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void donation() {
if (AlipayUtil.hasInstalledAlipayClient(getContext())) {
AlipayUtil.startAlipayClient(getActivity());
} else {
Toast.makeText(getContext(), "No found alipay on your phone!", Toast.LENGTH_LONG).show();
Toast.makeText(getContext(), "No Alipay APP found on your phone!", Toast.LENGTH_LONG).show();
}
}

Expand Down
2 changes: 1 addition & 1 deletion indicatorseekbar/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'

def VERSION_NAME = "2.0.9"
def VERSION_NAME = "2.1.0"

ext {
bintrayRepo = 'maven'
Expand Down

0 comments on commit 7422d74

Please sign in to comment.