Skip to content

Commit

Permalink
new fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fairytale110 committed May 4, 2019
2 parents 7942d8b + 30bfcae commit 0853500
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 26 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@

## SquaresLoadingView
> A SquaresLoadingView based on android.View, nicely rotation、easy to use.
## BezierSeekBar
> Beautiful custom View, SeekBar selector, easy to use, and rich in customization.
[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg)](https://android-arsenal.com/api?level=19)
[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://img.shields.io/badge/Download-1.0.0-brightgreen.svg) ](https://github.com/fairytale110/SquaresLoadingView/archive/1.0.0.zip)
[![Download](https://img.shields.io/badge/Download-1.0.0-brightgreen.svg) ](https://github.com/fairytale110/BezierSeekBar/archive/1.0.1.zip)

[中文README](https://github.com/fairytale110/BezierSeekBar/blob/master/README_CN.md)
### Preview

![preview.gif](https://upload-images.jianshu.io/upload_images/1781452-f256a5f5da4f9026.gif?imageMogr2/auto-orient/strip)

### Features

Supported functions:

- [x] Optionally configure the colors of each square
- [x] Manually stop and start the animation
- [x] Configurable anim's speed

- [x] Support the padding settings
![preview.gif](https://github.com/fairytale110/BezierSeekBar/raw/master/release/preview_1.0.1.gif)

### DEMO

Support will be forthcoming:
[![Download Demo APK](https://img.shields.io/badge/Download%20APK-1.0.1-brightgreen.svg) ](https://github.com/fairytale110/BezierSeekBar/raw/master/release/app-release.apk)
or you can scan this QRcode to download

- [ ] Manual rotation
![APK 1.0.1](https://github.com/fairytale110/BezierSeekBar/raw/master/release/demo_1.0.1_qrcode.png)

- [ ] Refresh header view support
### Features

- [ ] Etc
Supported functions:
- [x] Easy to use!
- [x] Optionally configure the colors of ALL
- [x] Smooth Bezier animation effects
- [x] Freely configure the selection interval
- [x] Dynamic monitoring of changes in selection

### How to

Expand All @@ -45,9 +43,9 @@ Add it in your root build.gradle at the end of repositories:
```
Step 2. Add the dependency
```
dependencies {
implementation 'com.github.fairytale110:SquaresLoadingView:1.0.0'
}
dependencies {
implementation 'com.github.fairytale110:BezierSeekBar:1.0.1'
}
```

### Usage
Expand Down Expand Up @@ -96,6 +94,9 @@ or
}
```

### blog(CN)
https://juejin.im/post/5bebed2fe51d450df867c3c1

### Participate in the contribution
[email protected]

Expand All @@ -104,14 +105,10 @@ [email protected]
[email protected]
> 简书: http://jianshu.com/u/d95b27ffdd3c
> 掘金: https://juejin.im/user/596d91ee6fb9a06bb874a800
> 掘金: https://juejin.im/user/596d91ee6fb9a06bb874a800/pins
> CSDN: https://blog.csdn.net/LJYBQ

> MY WEB: https://nicesky.tech

## LICENSE
### LICENSE

```
Copyright 2018 fairytale110
Expand All @@ -128,3 +125,5 @@ [email protected]
See the License for the specific language governing permissions and
limitations under the License.
```

### Github :https://github.com/fairytale110/BezierSeekBar
130 changes: 130 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

## BezierSeekBar
> 优雅的区间选择器,贝塞尔曲线样式,丰富的自定义内容,简单易懂的上手方式,
[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg)](https://android-arsenal.com/api?level=19)
[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://img.shields.io/badge/Download-1.0.0-brightgreen.svg) ](https://github.com/fairytale110/BezierSeekBar/archive/1.0.1.zip)

### 预览

![preview.gif](https://github.com/fairytale110/BezierSeekBar/raw/master/release/preview_1.0.1.gif)

### 演示 DEMO

[![Download Demo APK](https://img.shields.io/badge/Download%20APK-1.0.1-brightgreen.svg) ](https://github.com/fairytale110/BezierSeekBar/raw/master/release/app-release.apk)

或者直接手机扫码下载:

![APK 1.0.1](https://github.com/fairytale110/BezierSeekBar/raw/master/release/demo_1.0.1_qrcode.png)

### 功能


- [x] 超级简单的使用方式。

- [x] 所有内容可自定义颜色
- [x] 顺滑的交互动画
- [x] 自由配置样式
- [x] 选择区间可控、实时监听选择结果。

### 怎么使用?

仓库引用:

步骤 1. 添加 JitPack 依赖 到你的 build.gradle:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
步骤 2. 添加仓库
```
dependencies {
implementation 'com.github.fairytale110:BezierSeekBar:1.0.1'
}
```

### 使用方式

```java
<tech.nicesky.bezierseekbar.BezierSeekBar
android:id="@+id/bsBar_test"
app:bsBar_color_ball="@android:color/white"
app:bsBar_color_bg_selected="@android:color/white"
app:bsBar_color_line="@android:color/white"
app:bsBar_color_value="@android:color/white"
app:bsBar_color_value_selected="#ef5350"
app:bsBar_value_min="30"
app:bsBar_value_max="120"
app:bsBar_value_selected="65"
app:bsBar_unit="kg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
```
或者
```java

private void createBsbar() {
fram.setBackgroundColor(Color.WHITE);

BezierSeekBar seekBar = new BezierSeekBar(this);
seekBar.setColorBall(Color.BLACK);
seekBar.setColorLine(Color.BLACK);
seekBar.setColorValueSelected(Color.WHITE);
seekBar.setColorValue(Color.BLACK);
seekBar.setColorBgSelected(Color.BLACK);
seekBar.setValueMax(150);
seekBar.setValueMin(20);
seekBar.setValueSelected(60);
seekBar.setUnit("mm");
seekBar.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
seekBar.setSelectedListener(new OnSelectedListener() {
@Override
public void onSelected(int value) {
checkLength(value);
}
});
fram.addView(seekBar);
//checkLength(seekBar.getValueSelected());
}
```

### 源码解析

https://juejin.im/post/5bebed2fe51d450df867c3c1

### 参与贡献
[email protected]


### 作者
[email protected]
> 简书: http://jianshu.com/u/d95b27ffdd3c
> 掘金: https://juejin.im/user/596d91ee6fb9a06bb874a800/pins

### 开源协议

```
Copyright 2018 fairytale110
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.
```

### Github :https://github.com/fairytale110/BezierSeekBar
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Oct 15 17:14:40 CST 2018
#Wed Nov 14 10:07:24 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
2 changes: 1 addition & 1 deletion libBezierSeekBar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {

dependencies {

implementation rootProject.ext.dependencies.appCompat
//implementation rootProject.ext.dependencies.appCompat
testImplementation rootProject.ext.dependencies.junit
implementation fileTree(dir: 'libs', include: ['*.jar'])
//implementation 'com.android.support.constraint:constraint-layout:1.1.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @email [email protected]
* @description:
*/
@SuppressWarnings("all")
public class BezierSeekBar extends View {

private Context context;
Expand Down Expand Up @@ -513,4 +514,5 @@ public int getValueSelected(){
public void setUnit(String unit) {
this.unit = unit;
}

}

1 comment on commit 0853500

@beingmishra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice fix... misc.xml looking cool now

Please sign in to comment.