Skip to content

Commit

Permalink
修复Issue 7
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiancheng committed Jul 5, 2018
1 parent 6b525ae commit ccc983a
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 29 deletions.
8 changes: 8 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

15 changes: 1 addition & 14 deletions .idea/misc.xml

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

3 changes: 3 additions & 0 deletions .idea/modules.xml

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

8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -6,6 +6,12 @@ Lastest Version:

## 更新日志

### 1.0.5 版本 更新内容

修复Issues 与material design冲突问题。

请注意此版本之后,边界线宽度使用`boundaryWidth`指定。

### 1.0.4版本 更新内容
1. 支持圆形轮廓
2. 支持区域颜色渐变
Expand Down Expand Up @@ -37,7 +43,7 @@ XRadarView 支持高度自定义,其可调整属性及含义如下表所示。
|pointColor|圆点颜色|
|pointRadius|圆点半径大小|
|borderColor|边界线颜色|
|borderWidth|边界线的宽度|
|boundaryWidth|边界线的宽度|
|radiusColor|半径线的颜色|
|enabledBorder|是否画边界线|
|enabledAnimation|是否开启动画|
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -26,8 +26,8 @@ dependencies {
})
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
// compile project(':xradar')
compile 'com.orzangleli:xradar:1.0.4'
compile project(':xradar')
// compile 'com.orzangleli:xradar:1.0.5'
}


2 changes: 0 additions & 2 deletions app/src/main/java/com/orzangleli/radarview/MainActivity.java
Expand Up @@ -269,10 +269,8 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
break;
case R.id.drawIcon:
if (isChecked) {
radarView.setEnabledRegionShader(false);
radarView.setDrawables(drawables);
} else {
radarView.setEnabledRegionShader(true);
radarView.setDrawables(null);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_demo.xml
Expand Up @@ -18,7 +18,7 @@
app:count="7"
app:enabledBorder="true"
app:borderColor="#ff0000"
app:borderWidth="2dp"
app:boundaryWidth="2dp"
app:radiusColor="#88D3D8"
app:enabledShowPoint="false"
app:layerCount="4"
Expand Down
Empty file modified gradlew 100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion xradar/build.gradle
Expand Up @@ -37,7 +37,7 @@ publish {
userOrg = 'orzangleli'//bintray.com用户名
groupId = 'com.orzangleli'//jcenter上的路径
artifactId = 'xradar'//项目名称
publishVersion = '1.0.4'//版本号
publishVersion = '1.0.5'//版本号
desc = 'A highly customizable radar view for Android'//描述,不重要
website = 'https://github.com/hust201010701/XRadarView'//网站,不重要;尽量模拟github上的地址,例如我这样的;当然你有地址最好了
}
14 changes: 7 additions & 7 deletions xradar/src/main/java/com/orzangleli/radar/XRadarView.java
Expand Up @@ -73,7 +73,7 @@ public class XRadarView extends View {
// 边界线颜色
private int borderColor;
// 边界线的宽度
private int borderWidth;
private int boundaryWidth;
// 半径线的颜色
private int radiusColor;
// 雷达图渐变颜色数组
Expand Down Expand Up @@ -176,7 +176,7 @@ public XRadarView(Context context, @Nullable AttributeSet attrs, int defStyleAtt
pointColor = typedArray.getColor(R.styleable.XRadarView_pointColor, Color.parseColor("#80333366"));
borderColor = typedArray.getColor(R.styleable.XRadarView_borderColor, Color.parseColor("#80333366"));
radiusColor = typedArray.getColor(R.styleable.XRadarView_radiusColor, Color.parseColor("#80CCCCCC"));
borderWidth = typedArray.getDimensionPixelSize(R.styleable.XRadarView_borderWidth, 5);
boundaryWidth = typedArray.getDimensionPixelSize(R.styleable.XRadarView_boundaryWidth, 5);

pointRadius = typedArray.getDimensionPixelSize(R.styleable.XRadarView_pointRadius, 10);
enabledBorder = typedArray.getBoolean(R.styleable.XRadarView_enabledBorder, false);
Expand Down Expand Up @@ -240,7 +240,7 @@ public XRadarView(Context context, @Nullable AttributeSet attrs, int defStyleAtt
borderPaint.setStyle(Paint.Style.FILL_AND_STROKE);
borderPaint.setAntiAlias(true);
borderPaint.setColor(borderColor);
borderPaint.setStrokeWidth(borderWidth);
borderPaint.setStrokeWidth(boundaryWidth);


loadAnimation(enabledAnimation);
Expand Down Expand Up @@ -881,12 +881,12 @@ public void setBorderColor(int borderColor) {
invalidate();
}

public int getBorderWidth() {
return borderWidth;
public int getBoundaryWidth() {
return boundaryWidth;
}

public void setBorderWidth(int borderWidth) {
this.borderWidth = borderWidth;
public void setBoundaryWidth(int boundaryWidth) {
this.boundaryWidth = boundaryWidth;
}

public boolean isEnabledPolygon() {
Expand Down
2 changes: 1 addition & 1 deletion xradar/src/main/res/values/attrs.xml
Expand Up @@ -19,7 +19,7 @@
<attr name="pointColor" format="color|reference" />
<attr name="borderColor" format="color|reference" />
<attr name="radiusColor" format="color|reference" />
<attr name="borderWidth" format="dimension|reference" />
<attr name="boundaryWidth" format="dimension|reference" />
<attr name="pointRadius" format="dimension|reference" />
<attr name="enabledBorder" format="boolean"/>
<attr name="enabledAnimation" format="boolean"/>
Expand Down

0 comments on commit ccc983a

Please sign in to comment.