Skip to content

Commit b8e8016

Browse files
committed
update dependencies and build tools
1 parent 90b9336 commit b8e8016

File tree

4 files changed

+37
-18
lines changed

4 files changed

+37
-18
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
### v1.0.3
4+
* update dependencies and build tools
5+
36
### v1.0.2
47
* allow data to flow from page to page. The current page can now get the result of the previous page.
58

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add the following to your app's `build.gradle` file:
1616

1717
```java
1818
dependencies {
19-
compile "com.klinkerapps:floating-tutorial:1.0.2"
19+
compile "com.klinkerapps:floating-tutorial:1.0.3"
2020
}
2121
```
2222

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
# limitations under the License.
1515
#
1616

17-
GRADLE_PLUGIN_VERSION=3.0.0-beta6
18-
BUILD_TOOLS_VERSION=26.0.1
19-
KOTLIN_VERSION=1.1.4-3
17+
GRADLE_PLUGIN_VERSION=3.0.1
18+
BUILD_TOOLS_VERSION=27.0.1
19+
KOTLIN_VERSION=1.2.0
2020

21-
ANDROID_SUPPORT_VERSION=26.1.0
21+
ANDROID_SUPPORT_VERSION=27.0.2
2222

2323
MIN_SDK=15
24-
TARGET_SDK=26
25-
COMPILE_SDK=26
24+
TARGET_SDK=27
25+
COMPILE_SDK=27
2626

27-
VERSION_NAME=1.0.2
27+
VERSION_NAME=1.0.3
2828
VERSION_CODE=2
2929
GROUP=com.klinkerapps
3030

library/src/main/java/xyz/klinker/android/floating_tutorial/TutorialPresenter.kt

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ internal class TutorialPresenter(private val activity: FloatingTutorialActivity,
8484
val cx = firstPage.width / 2
8585
val cy = firstPage.height / 2
8686
val finalRadius = Math.hypot(cx.toDouble(), cy.toDouble()).toFloat()
87-
ViewAnimationUtils.createCircularReveal(firstPage, cx, cy, 0f, finalRadius).start()
87+
88+
try {
89+
ViewAnimationUtils.createCircularReveal(firstPage, cx, cy, 0f, finalRadius).start()
90+
} catch (e: IllegalStateException) {
91+
firstPage.alpha = 0f
92+
firstPage.animate().alpha(1f).start()
93+
}
8894
} else {
8995
firstPage.alpha = 0f
9096
firstPage.animate().alpha(1f).start()
@@ -104,16 +110,26 @@ internal class TutorialPresenter(private val activity: FloatingTutorialActivity,
104110
val cx = currentPage.width / 2
105111
val cy = currentPage.height / 2
106112
val initialRadius = Math.hypot(cx.toDouble(), cy.toDouble()).toFloat()
107-
val anim = ViewAnimationUtils.createCircularReveal(currentPage, cx, cy, initialRadius, 0f)
108-
anim.addListener(object : AnimatorListenerAdapter() {
109-
override fun onAnimationEnd(animation: Animator) {
110-
super.onAnimationEnd(animation)
111-
currentPage.visibility = View.INVISIBLE
112-
activity.close()
113-
}
114-
})
115113

116-
anim.start()
114+
try {
115+
val anim = ViewAnimationUtils.createCircularReveal(currentPage, cx, cy, initialRadius, 0f)
116+
anim.addListener(object : AnimatorListenerAdapter() {
117+
override fun onAnimationEnd(animation: Animator) {
118+
super.onAnimationEnd(animation)
119+
currentPage.visibility = View.INVISIBLE
120+
activity.close()
121+
}
122+
})
123+
124+
anim.start()
125+
} catch (e: IllegalStateException) {
126+
currentPage.animate().alpha(0f).setListener(object : AnimatorListenerAdapter() {
127+
override fun onAnimationEnd(animation: Animator) {
128+
super.onAnimationEnd(animation)
129+
activity.close()
130+
}
131+
}).start()
132+
}
117133
} else {
118134
currentPage.animate().alpha(0f).setListener(object : AnimatorListenerAdapter() {
119135
override fun onAnimationEnd(animation: Animator) {

0 commit comments

Comments
 (0)