【问题标题】:Push Up animation in android?在android中推送动画?
【发布时间】:2011-11-16 09:50:28
【问题描述】:

我需要在我的 android 应用程序中实现新闻提要。它应该像 API Demos 中的俯卧撑动画一样动画。但是在我的应用程序中,我得到了一个包含图像及其标题的对象数组。如何使用 ViewFlipper 或任何其他方式为新闻提要制作动画?

提前致谢!

【问题讨论】:

    标签: android viewflipper android-animation feed


    【解决方案1】:

    AniationFactory.java 中有函数outFromBottom()

    假设您有yourView,并且您想将其添加到名为feedLL 的垂直LinearLayout

    使用以下代码:

    Animation animation = AnimationFactory.inFromBottom();
    animation.setDuration(1000);
    yourView.setVisibility(View.GONE);
    yourView.setAnimation(animation);
    feedLL.addView(yourView);
    yourView.setVisibility(View.VISIBILE);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-13
      • 1970-01-01
      • 2012-11-03
      • 2015-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多