Skip to content

Commit

Permalink
[#126 #57] Fix selected dot position after page rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
tommybuonomo committed Apr 30, 2022
1 parent d99a2e9 commit 32ae67c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.database.DataSetObserver
import android.graphics.Color
import android.os.Build.VERSION
import android.os.Build.VERSION_CODES
import android.os.Parcelable
import android.util.AttributeSet
import android.view.View
import android.widget.FrameLayout
Expand Down Expand Up @@ -333,4 +334,9 @@ abstract class BaseDotsIndicator @JvmOverloads constructor(
requestLayout()
}
}

override fun onRestoreInstanceState(state: Parcelable?) {
super.onRestoreInstanceState(state)
post { refreshDots() }
}
}

0 comments on commit 32ae67c

Please sign in to comment.