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
Case: MotionLayout with RecyclerView child. Transition has OnSwipe TouchResponse without TouchAnchorId (whole MotionLayout area):
TouchAnchorId
<Transition android:id="@+id/transition" motion:constraintSetStart="@id/start" motion:constraintSetEnd="@id/end"> <OnSwipe /> </Transition>
All works fine after any MOVE touch event (non-nested scrollable): mAnchorDpDt set by minSize = Math.min(mMotionLayout.getWidth(), mMotionLayout.getHeight())
But, before processTouchEvent MOVE, mAnchorDpDt has incorrect value [0.01, 0.01] and strange behavior in case nested scroll TouchResponse.scrollMove
mAnchorDpDt
[0.01, 0.01]
Temporary fix:
fun MotionScene.Transition.fixAnchorDpDt(minSize: Float) { val mAnchorDpDt: FloatArray = touchResponse.getPrivateProperty("mAnchorDpDt") as FloatArray mAnchorDpDt[1] = -minSize } fun <T : Any> T.getPrivateProperty(variableName: String): Any? { return javaClass.getDeclaredField(variableName).let { field -> field.isAccessible = true return@let field.get(this) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Case:
MotionLayout with RecyclerView child.
Transition has OnSwipe TouchResponse without
TouchAnchorId
(whole MotionLayout area):All works fine after any MOVE touch event (non-nested scrollable): mAnchorDpDt set by minSize = Math.min(mMotionLayout.getWidth(), mMotionLayout.getHeight())
But, before processTouchEvent MOVE,
mAnchorDpDt
has incorrect value[0.01, 0.01]
and strange behavior in case nested scroll TouchResponse.scrollMoveTemporary fix:
The text was updated successfully, but these errors were encountered: