Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
woxingxiao committed Mar 12, 2017
1 parent 3245229 commit ab66a80
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
**A beautiful Android custom seekbar, which has a bubble view with progress appearing upon when seeking. Highly customizable, mostly demands has been considered. `star` or `pull request` will be welcomed**
****
##Screenshot
![demo](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo.gif)
![demo](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo2.gif)
![demo1](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo1.gif)
![demo2](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo2.gif)
![demo3](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo3.gif)
##Download
root project:`build.gradle`
```groovy
Expand All @@ -25,8 +26,8 @@ app:`build.gradle`
}
```
##Usage
Check out the demo for more details: [**`MainActivity.java`**](https://github.com/woxingxiao/BubbleSeekBar/blob/master/app/src/main/java/com/xw/samlpe/bubbleseekbar/MainActivity.java)
[**`content_main.xml`**](https://github.com/woxingxiao/BubbleSeekBar/blob/master/app/src/main/res/layout/content_main.xml)
Check out the demo for more details.
Or download the apk:
[**sample.apk**](https://github.com/woxingxiao/BubbleSeekBar/raw/master/apk/sample.apk)
##Attentions
- You must correct the offsets by setting `ScrollListener` when `BubbleSeekBar`'s parent view is scrollable, otherwise the position of bubble appears maybe be wrong. For example:
Expand Down Expand Up @@ -59,9 +60,11 @@ bsb_track_color|int|color of _right-track_, default: R.color.colorPrimary
bsb_second_track_color|int|color of _left-track_, default: R.color.colorAccent
bsb_thumb_color|int|color of _thumb_, default: same as _left-track_'s color
bsb_show_text|boolean|show _min-text_ and _max-text_ or not, default: false
bsb_text_size|dimension|text size of _min-text_ and _max-text_, default: 14sp
bsb_text_color|int|text color of _min-text_ and _max-text_, default: same as _right-track_'s color
bsb_text_position|enum|text position of _min-text_ and _max-text_ relative to _track_, `SIDES` or `BOTTOM`, default: `SIDES`
bsb_show_section_text|boolean|show _section-text_ or not, default: false
bsb_section_text_size|dimension|text size of _section-text_, default: 14sp
bsb_section_text_color|int|text color of _section-text_, default: same as _right-track_'s color
bsb_section_text_position|enum|text position of _section-text_ relative to _track_, `SIDES` `BOTTOM_SIDES` `BELOW_SECTION_MARK`, default: `SIDES`
bsb_section_text_interval|int|the interval of two _section-text_, default: 1
bsb_show_thumb_text|boolean|show real time _progress-text_ under _thumb_ or not, default: false
bsb_thumb_text_size|dimension|text size of _progress-text_, default: 14sp
bsb_thumb_text_color|int|text color of _progress-text_, default: same as _left-track_'s color
Expand All @@ -71,6 +74,7 @@ bsb_bubble_text_size|dimension|text size of _bubble-progress_, default: 14sp
bsb_bubble_text_color|int|text color of _bubble-progress_, default: #ffffffff
bsb_anim_duration|int|duration of animation, default: 200ms
bsb_touch_to_seek|boolean|touch anywhere on _track_ to quickly seek, default: false
bsb_seek_by_section|boolean|seek by section, the _progress_ may not be continuous, default: false
##License
```
The MIT License (MIT)
Expand Down
19 changes: 11 additions & 8 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
**自定义`SeekBar`,进度变化由可视化气泡样式呈现,定制化程度较高,适合大部分需求。欢迎`star` or `pull request`**
****
##Screenshot
![demo](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo.gif)
![demo](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo2.gif)
![demo1](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo1.gif)
![demo2](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo2.gif)
![demo3](https://github.com/woxingxiao/BubbleSeekBar/blob/master/screenshot/demo3.gif)
##Download
root project:`build.gradle`
```groovy
Expand All @@ -23,8 +24,8 @@ app:`build.gradle`
}
```
##Usage
查看demo获知更多使用细节: [**`MainActivity.java`**](https://github.com/woxingxiao/BubbleSeekBar/blob/master/app/src/main/java/com/xw/samlpe/bubbleseekbar/MainActivity.java)
[**`content_main.xml`**](https://github.com/woxingxiao/BubbleSeekBar/blob/master/app/src/main/res/layout/content_main.xml)
查看demo获知更多使用细节
或者下载安装apk:
[**sample.apk**](https://github.com/woxingxiao/BubbleSeekBar/raw/master/apk/sample.apk)
##Attentions
- 如果`BubbleSeekBar`的外部容器是可滑动的控件,需要设置滑动监听来修正气泡的偏移,否则滑动后气泡出现位置可能错乱。方法如下:
Expand Down Expand Up @@ -56,10 +57,11 @@ bsb_auto_adjust_section_mark|boolean|是否拖动放手后自动滑向均分点
bsb_track_color|int|右track颜色,默认R.color.colorPrimary
bsb_second_track_color|int|左track颜色,默认R.color.colorAccent
bsb_thumb_color|int|thumb颜色,默认与左track颜色相同
bsb_show_text|boolean|是否显示起始值和结束值,默认false
bsb_text_size|dimension|显示起始值和结束值的文字大小,默认14sp
bsb_text_color|int|显示起始值和结束值的文字颜色,默认与右track相同
bsb_text_position|enum|显示首尾值与track的位置关系,在两端还是在底部,默认在两端
bsb_show_section_text|boolean|是否显示起始值和结束值,默认false
bsb_section_text_size|dimension|显示起始值和结束值的文字大小,默认14sp
bsb_section_text_color|int|显示起始值和结束值的文字颜色,默认与右track相同
bsb_section_text_position|enum|显示首尾值与track的位置关系,在两端、首尾底部或者底部,默认在两端
bsb_section_text_interval|int|section-text显示间隔多少个section,默认1个
bsb_show_thumb_text|boolean|是否在thumb下面显示进度值,默认false
bsb_thumb_text_size|dimension|thumb下进度文字大小,默认14sp
bsb_thumb_text_color|int|thumb下进度文字颜色,默认与左track相同
Expand All @@ -69,6 +71,7 @@ bsb_bubble_text_size|dimension|气泡中进度文字大小,默认14sp
bsb_bubble_text_color|int|气泡中进度文字颜色,默认白色
bsb_anim_duration|int|动画执行时间, 默认: 200ms
bsb_touch_to_seek|boolean|是否点击track任意地方来快速设置进度, 默认: false  
bsb_seek_by_section|boolean|是否按section为增量来seek,如此操作progress可能不连续,默认: false
--------
>**人生苦短,请选择科学上网。推荐一下本人正在使用的,稳定高速,便宜好用。[推介链接](https://portal.shadowsocks.com.hk/aff.php?aff=8881) **  
Expand Down

0 comments on commit ab66a80

Please sign in to comment.