Android:降低高度动画
我正在尝试实现与 Twitter 客户端中的“拉动刷新”动画类似的效果。
我想要一个包含一些文本的视图从屏幕(顶部)“滑出”。我尝试了过渡动画并且它有效,只是视图下方的内容保持在同一位置。当上面的视图移出屏幕时,我希望其余内容也“滑动”到顶部。我已将 fillAfter 设置为 true,因此顶部视图实际上会像应有的那样保持在屏幕之外,只是该视图下方的内容不会随之滑动。
希望有人能帮忙。
提前致谢, 埃里克
I'm trying to achieve a similar effect as the 'Pull to refresh' amimation in for example the Twitter client.
I want a view, which contains some text, to 'slide out' off the screen (top). I tried the transition animation and it works, except that the content below the view stays on the same place. I want the rest of the content to 'slide' to the top as well, as the view above moves out of the screen. I have set fillAfter to true, so the top view actually stays out of screen like it should, it's just the stuff below that view that won't slide up with it.
Hope someone can help.
Thanks in advance,
Erik
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将您用于上述视图的
TranslateAnimation
分配给您的内容视图。Assign the
TranslateAnimation
you use for your above view to your content view(s).