组件在设置了borderRadius再设置animate,动画效果会有问题 #1341
Unanswered
qoakzmxncb
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
`View {
attr {
positionAbsolute()
overflow(false)
left(this@HomePage.getHotActivityCardLeft(index))
top(0f)
width(this@HomePage.getHotActivityCardWidth(index))
height(HOME_HOT_ACTIVITY_HEIGHT)
backgroundColor(Color.BLUE)
borderRadius(12f)
animate(Animation.easeInOut(0.28f), this@HomePage.hotActivityWideIndex)
}`
这代码这么写执行动画是会有问题的,我这里主要是通过getHotActivityCardWidth()来改变组件的宽度,但是加上borderRadius之后组件从宽变窄会直接消失动画过程,直接就变为目标宽度了
All reactions