【发布时间】:2020-10-07 13:04:30
【问题描述】:
每当我尝试在可滚动的 constraintLayout 上应用 ConstraintLayout 动画时,我都会收到无法将 ScrollView 转换为 ConstraintLayout 的错误,这听起来很合理。
有没有办法在不使用 ScrollView 作为父级的情况下使约束布局可滚动?这样我就可以使用它的甜美动画了。
谢谢。
【问题讨论】:
-
从您所说的“我无法将 ScrollView 转换为 ConstraintLayout”来看,这听起来更像是您试图将 ScrollView 转换为 ConstraintLayout,如下所示:(Kotlin)
myScrollView as ConstraintLayout, (Java)(ConstraintLayout) myScrollView。如果是这种情况,那么您的错误与动画无关。请提供您的代码以供进一步调查! -
感谢您的回答,但是 IDE 告诉我“演员永远不会成功”
标签: android animation layout constraints scrollview