【问题标题】:How to translate animation from top?如何从顶部翻译动画?
【发布时间】:2018-11-20 18:30:09
【问题描述】:

我尝试在 xml 中将项目从 to 移动到当前位置

我试试这个

 <?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"

    android:duration="@android:integer/config_longAnimTime"
    android:fromYDelta="0%p"
    android:toYDelta="0"
    />

但是失败了。我不完全理解如何强制这个 Android 来做这个。需要你帮忙。

【问题讨论】:

    标签: android xml animation translate


    【解决方案1】:

    我想我创建了解决方案

    -100%p 而不是 0%p

     <?xml version="1.0" encoding="utf-8"?>
    <translate xmlns:android="http://schemas.android.com/apk/res/android"
        android:duration="@android:integer/config_longAnimTime"
        android:fromYDelta="-100%p"
        android:toYDelta="0"
        />
    

    【讨论】:

      猜你喜欢
      • 2012-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-13
      • 2014-10-03
      • 2013-08-14
      相关资源
      最近更新 更多