From e0a335a90305749e47d27a5c41b37ea2f969620b Mon Sep 17 00:00:00 2001 From: Teresa Holfeld Date: Thu, 25 Oct 2018 12:55:23 +0200 Subject: [PATCH 1/2] Clear method --- .../storiesprogressview/StoriesProgressView.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/src/main/java/jp/shts/android/storiesprogressview/StoriesProgressView.java b/library/src/main/java/jp/shts/android/storiesprogressview/StoriesProgressView.java index 7c63d06..3ae0402 100644 --- a/library/src/main/java/jp/shts/android/storiesprogressview/StoriesProgressView.java +++ b/library/src/main/java/jp/shts/android/storiesprogressview/StoriesProgressView.java @@ -215,10 +215,21 @@ public void startStories(int from) { progressBars.get(from).startProgress(); } + public void clear() { + progressBars.clear(); + storiesCount = -1; + current = -1; + storiesListener = null; + isComplete = false; + isSkipStart = false; + isReverseStart = false; + } + /** * Need to call when Activity or Fragment destroy */ public void destroy() { + clear(); for (PausableProgressBar p : progressBars) { p.clear(); } From 2569bb71cc9b2a523de0fbcee0c25f1723d63334 Mon Sep 17 00:00:00 2001 From: Teresa Holfeld Date: Thu, 25 Oct 2018 13:19:14 +0200 Subject: [PATCH 2/2] Update android, gradle, dependencies --- app/build.gradle | 8 ++++---- build.gradle | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- library/build.gradle | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 62fc7a3..3d24e42 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { applicationId "jp.shts.android.storyprogressbar" minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -21,7 +21,7 @@ android { dependencies { implementation project(':library') - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { diff --git a/build.gradle b/build.gradle index 767da9a..22b5263 100644 --- a/build.gradle +++ b/build.gradle @@ -2,12 +2,12 @@ buildscript { repositories { + google() jcenter() mavenCentral() - google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -16,8 +16,8 @@ buildscript { allprojects { repositories { - jcenter() google() + jcenter() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 74cc99b..096f39d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/library/build.gradle b/library/build.gradle index 79e87bc..b8fe8a4 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" @@ -22,7 +22,7 @@ android { } dependencies { - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations'