Search code examples
androidxmlanimationtranslate

How to translate animation from top?


I try to animate move item from to to it current position in xml

I try this

 <?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"
    />

But faile. I do not understant fully how to coerce this Android to make this. Need you help please.


Solution

  • I think i founded solution

    -100%p instead 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"
        />