Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
在 MotionLayout 中,您可以在一种状态下将视图完全限制在屏幕上,而在另一种状态下将视图完全限制在屏幕外。转换会将视图“滑入”。
当人们使用 MotionLayout 执行此操作时,典型的问题是如何将“全尺寸视图”限制在屏幕边界之外。
有几种方法可以实现这一点 2 是:
关键是您将视图的左侧限制到父级的右侧。
这是幻灯片约束布局的示例在。
I motionLayout you would constrain the view fully on screen in one state and fully off screen in the other. Than the transition would "slide" the view in.
The typical problem when people do this with MotionLayout is how to constrain a "full size view" outside the bounds of the screen.
There are several ways to accomplish this 2 are:
The key is you are constraining the left side of the view to the right side of the parent.
This is an example of layout the constraints for slide in.