Skip to content

Commit

Permalink
- add LAYER_TYPE_SOFTWARE to fix crashing on some devices
Browse files Browse the repository at this point in the history
- upgrade gradle version
  • Loading branch information
zagum committed Mar 29, 2018
1 parent 6a4d3ca commit cea188a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.1.0'
}
}

Expand All @@ -16,12 +16,12 @@ allprojects {
}

ext {
compileSdkVersion = 26
compileSdkVersion = 27
buildToolsVersion = '27.0.0'
minSdkVersion = 15
targetSdkVersion = compileSdkVersion

supportLibVersion = '27.0.0'
supportLibVersion = '27.1.0'
}

task clean(type: Delete) {
Expand Down
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 @@
#Tue Oct 31 10:29:16 MSK 2017
#Thu Mar 29 16:29:46 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public SwitchIconView(@NonNull Context context, @Nullable AttributeSet attrs) {
public SwitchIconView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);

setLayerType(LAYER_TYPE_SOFTWARE, null);

TypedArray array = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.SwitchIconView, 0, 0);

try {
Expand Down

0 comments on commit cea188a

Please sign in to comment.