tankery / CircularSeekBar

Custom circular SeekBar (Circle, Semi-circle, and Ellipse) for Android
Apache License 2.0
368 stars 59 forks source link

User interaction when CircularSeekBar is created in a Fragment #43

Open albertocampeol opened 2 years ago

albertocampeol commented 2 years ago

Your code does not support user interaction when the CSB is in a Fragment. Once the Fragment gets recreated by the system, the user loses control of the MotionEvent and the progress stops. Maybe consider to put the MotionEvent, mUserIsMovingPointer, mPointerPosition, mStartAngle in the Bundle in onSaveInstanceState() and then restore it if needed in onRestoreInstanceState(Parcelable state)