简体   繁体   中英

android animate right to left

I am applying animation on popup, right to left. I am using this piece of code, but even after some experiments, it always scale from left to right

<set xmlns:android="http://schemas.android.com/apk/res/android"> 
<scale
android:fromYScale="0"
android:toYScale="1"
android:startOffset="0"
android:duration="300"

android:fromXScale="0.5"
android:toXScale="1"
android:fillBefore="true" />

I have tried setting pivotX to 1 but still the result is always same.

Have you tried to use translate instead of scale (or both) ?

<translate
    android:fromXDelta="0"
    android:toXDelta="100%p"
    android:fromYDelta="100%p"
    android:toYDelta="100%p" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM