Skip to content

Commit e48352a

Browse files
committed
[opt]:update build tools versions
1 parent 94577b1 commit e48352a

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.1'
8+
classpath 'com.android.tools.build:gradle:2.3.3'
99
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // Add this line
1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ group='com.github.kilnn'
44

55
android {
66
compileSdkVersion 25
7-
buildToolsVersion "25.0.0"
7+
buildToolsVersion "25.0.3"
88

99
defaultConfig {
1010
minSdkVersion 8

library/src/main/java/com/github/kilnn/diffuse/DiffuseLayout.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/**
1919
* Created by Kilnn on 2017/3/20.
20-
* 参考:http://blog.csdn.net/airsaid/article/details/52683193
20+
* Reference:http://blog.csdn.net/airsaid/article/details/52683193
2121
*/
2222

2323
public class DiffuseLayout extends LinearLayout {
@@ -64,9 +64,11 @@ public DiffuseLayout(Context context, AttributeSet attrs, int defStyleAttr, int
6464

6565
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
6666
Drawable bg = getBackground();
67-
if (bg != null && bg instanceof ColorDrawable) {
68-
mCenterColor = ((ColorDrawable) bg).getColor();
69-
setBackgroundDrawable(null);
67+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
68+
if (bg != null && bg instanceof ColorDrawable) {
69+
mCenterColor = ((ColorDrawable) bg).getColor();
70+
setBackgroundDrawable(null);
71+
}
7072
}
7173
mDiffuseColor = mCenterColor;
7274
if (attrs != null) {

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.0"
5+
buildToolsVersion "25.0.3"
66
defaultConfig {
77
applicationId "com.github.kilnn.diffuse.sample"
88
minSdkVersion 9

sample/src/main/res/layout/activity_main.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@
1010
<com.github.kilnn.diffuse.DiffuseLayout
1111
android:layout_width="wrap_content"
1212
android:layout_height="wrap_content"
13+
android:background="#ff0000"
14+
android:gravity="center"
1315
app:diffuse_color="#ff0000"
1416
app:diffuse_count="3"
1517
app:diffuse_every_time="20"
1618
app:diffuse_width="10dp"
17-
android:background="#ff0000"
1819
app:layout_constraintBottom_toBottomOf="parent"
1920
app:layout_constraintLeft_toLeftOf="parent"
2021
app:layout_constraintRight_toRightOf="parent"
2122
app:layout_constraintTop_toTopOf="parent">
2223

2324
<TextView
24-
android:layout_width="100dp"
25-
android:layout_height="100dp"
25+
android:layout_width="wrap_content"
26+
android:layout_height="wrap_content"
2627
android:text="Hello World!"/>
2728

2829
</com.github.kilnn.diffuse.DiffuseLayout>

0 commit comments

Comments
 (0)