Skip to content

Commit

Permalink
v1.6.1
Browse files Browse the repository at this point in the history
修复 Android 9 圆角策略失效问题
  • Loading branch information
GcsSloop committed Oct 9, 2018
1 parent e8e1a62 commit 96452ea
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 10 deletions.
Binary file modified RCLayout/.idea/caches/build_file_checksums.ser
Binary file not shown.
8 changes: 8 additions & 0 deletions RCLayout/.idea/markdown-exported-files.xml

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

78 changes: 78 additions & 0 deletions RCLayout/.idea/markdown-navigator.xml

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

3 changes: 3 additions & 0 deletions RCLayout/.idea/markdown-navigator/profiles_settings.xml

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

6 changes: 6 additions & 0 deletions RCLayout/.idea/vcs.xml

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

2 changes: 1 addition & 1 deletion RCLayout/rclayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
ext {
GROUP_ID = "com.gcssloop.widget"
ARTIFACT_ID = "rclayout"
VERSION = "1.6.0"
VERSION = "1.6.1"
}

apply from: "/Applications/nexus/pack/pack-upload.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.graphics.Region;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.Checkable;

import com.gcssloop.rclayout.R;
import com.gcssloop.widget.RCRelativeLayout;

import java.util.ArrayList;

Expand All @@ -63,7 +58,6 @@ public class RCHelper {
public int mStrokeWidth; // 描边半径
public boolean mClipBackground; // 是否剪裁背景
public Region mAreaRegion; // 内容区域
public int mEdgeFix = 10; // 边缘修复
public RectF mLayer; // 画布图层大小

public void initAttrs(Context context, AttributeSet attrs) {
Expand Down Expand Up @@ -132,8 +126,8 @@ public void refreshRegion(View view) {
} else {
mClipPath.addRoundRect(areas, radii, Path.Direction.CW);
}
mClipPath.moveTo(-mEdgeFix, -mEdgeFix); // 通过空操作让Path区域占满画布
mClipPath.moveTo(w + mEdgeFix, h + mEdgeFix);
mClipPath.moveTo(0, 0); // 通过空操作让Path区域占满画布
mClipPath.moveTo(w , h);
Region clip = new Region((int) areas.left, (int) areas.top,
(int) areas.right, (int) areas.bottom);
mAreaRegion.setPath(mClipPath, clip);
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ allprojects {
在需要添加依赖的 Module 下添加以下信息,使用方式和普通的远程仓库一样。

```groovy
implementation 'com.gcssloop.widget:rclayout:1.6.0'
implementation 'com.gcssloop.widget:rclayout:1.6.1'
```


Expand All @@ -137,6 +137,10 @@ implementation 'com.gcssloop.widget:rclayout:1.6.0'

## 更新日志

#### v1.6.1

解决 Android 9 上圆角策略失效的问题。

#### v1.6.0

描边颜色支持 seletor。
Expand Down

0 comments on commit 96452ea

Please sign in to comment.