We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't move the sliders if it is in Scroll layout.
The text was updated successfully, but these errors were encountered:
I managed to fixed it. I dowloaded the library and changed onTouchEvent. SOLUTION: parent.requestDisallowInterceptTouchEvent(true)
parent.requestDisallowInterceptTouchEvent(true)
This is the full onTouchEvent code.
@SuppressLint("ClickableViewAccessibility") override fun onTouchEvent(ev: MotionEvent): Boolean { //To make it touchable when inside of a scrollview parent.requestDisallowInterceptTouchEvent(true) val x = ev.x val y = ev.y when (ev.action) { MotionEvent.ACTION_DOWN -> { return true } MotionEvent.ACTION_MOVE -> { val touchAngleRad = atan2(center.y - y, x - center.x).toDouble() if (draggingSleep) { val sleepAngleRad = Math.toRadians(sleepAngle) val diff = Math.toDegrees(angleBetweenVectors(sleepAngleRad, touchAngleRad)) sleepAngle = to_0_720(sleepAngle + diff) requestLayout() notifyChanges() return true } else if (draggingWake) { val wakeAngleRad = Math.toRadians(wakeAngle) val diff = Math.toDegrees(angleBetweenVectors(wakeAngleRad, touchAngleRad)) wakeAngle = to_0_720(wakeAngle + diff) requestLayout() notifyChanges() return true } } MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> { draggingSleep = false draggingWake = false } } return super.onTouchEvent(ev) }
Sorry, something went wrong.
No branches or pull requests
Can't move the sliders if it is in Scroll layout.
The text was updated successfully, but these errors were encountered: