Skip to content

Commit

Permalink
Fix speed not change in fragments.
Browse files Browse the repository at this point in the history
  • Loading branch information
anastr committed Aug 25, 2021
1 parent 4039713 commit 1ff6da1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_marks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
app:sv_markColor="#414141"
app:sv_degreeBetweenMark="5"
app:sv_markWidth="3dp"/>

<CheckBox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,9 @@ abstract class Gauge constructor(

override fun onVisibilityAggregated(isVisible: Boolean) {
super.onVisibilityAggregated(isVisible)
if (isVisible) tremble() else cancelSpeedAnimator()
if (speedAnimator?.isRunning == false && realSpeedAnimator?.isRunning == false) {
if (isVisible) tremble() else cancelTremble()
}
}

override fun jumpDrawablesToCurrentState() {
Expand Down

0 comments on commit 1ff6da1

Please sign in to comment.