Skip to content

Commit

Permalink
修正部分 Layout 继承关系不正确的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
getActivity committed Jul 20, 2021
1 parent 4b05609 commit 59c3420
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* 项目地址:[Github](https://github.com/getActivity/ShapeView)[码云](https://gitee.com/getActivity/ShapeView)

* 博客介绍:[震惊,没想到 Shape 也可以这么写](https://www.jianshu.com/p/1288d8873440)

* 点击此处 [下载 Demo](ShapeView.apk) 进行演示或者测试

#### 集成步骤
Expand Down Expand Up @@ -34,7 +36,7 @@ android {
dependencies {
// Shape 框架:https://github.com/getActivity/ShapeView
implementation 'com.github.getActivity:ShapeView:2.0'
implementation 'com.github.getActivity:ShapeView:2.2'
}
```

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.hjq.shape.demo"
minSdkVersion 16
targetSdkVersion 28
versionCode 20
versionName "2.0"
versionCode 22
versionName "2.2"

// 支持 Java JDK 8
compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {

defaultConfig {
minSdkVersion 16
versionCode 20
versionName "2.0"
versionCode 22
versionName "2.2"
}

// 支持 Java JDK 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.content.Context;
import android.content.res.TypedArray;
import android.support.constraint.ConstraintLayout;
import android.util.AttributeSet;
import android.view.View;

import com.hjq.shape.IShapeDrawable;
import com.hjq.shape.R;
Expand All @@ -14,7 +14,7 @@
* time : 2021/07/17
* desc : 支持直接定义 Shape 背景的 ConstraintLayout
*/
public class ShapeConstraintLayout extends View implements IShapeDrawable<ShapeConstraintLayout> {
public class ShapeConstraintLayout extends ConstraintLayout implements IShapeDrawable<ShapeConstraintLayout> {

private int mShape;
private int mShapeWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;

import com.hjq.shape.IShapeDrawable;
import com.hjq.shape.R;
Expand All @@ -14,7 +14,7 @@
* time : 2021/07/17
* desc : 支持直接定义 Shape 背景的 FrameLayout
*/
public class ShapeFrameLayout extends View implements IShapeDrawable<ShapeFrameLayout> {
public class ShapeFrameLayout extends FrameLayout implements IShapeDrawable<ShapeFrameLayout> {

private int mShape;
private int mShapeWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

import com.hjq.shape.IShapeDrawable;
import com.hjq.shape.R;
Expand All @@ -14,7 +14,7 @@
* time : 2021/07/17
* desc : 支持直接定义 Shape 背景的 LinearLayout
*/
public class ShapeLinearLayout extends View implements IShapeDrawable<ShapeLinearLayout> {
public class ShapeLinearLayout extends LinearLayout implements IShapeDrawable<ShapeLinearLayout> {

private int mShape;
private int mShapeWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.content.Context;
import android.content.res.TypedArray;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;

import com.hjq.shape.IShapeDrawable;
import com.hjq.shape.R;
Expand All @@ -14,7 +14,7 @@
* time : 2021/07/17
* desc : 支持直接定义 Shape 背景的 RecyclerView
*/
public class ShapeRecyclerView extends View implements IShapeDrawable<ShapeRecyclerView> {
public class ShapeRecyclerView extends RecyclerView implements IShapeDrawable<ShapeRecyclerView> {

private int mShape;
private int mShapeWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;

import com.hjq.shape.IShapeDrawable;
import com.hjq.shape.R;
Expand All @@ -14,7 +14,7 @@
* time : 2021/07/17
* desc : 支持直接定义 Shape 背景的 RelativeLayout
*/
public class ShapeRelativeLayout extends View implements IShapeDrawable<ShapeRelativeLayout> {
public class ShapeRelativeLayout extends RelativeLayout implements IShapeDrawable<ShapeRelativeLayout> {

private int mShape;
private int mShapeWidth;
Expand Down

0 comments on commit 59c3420

Please sign in to comment.