Image moving in background along a curve path andr

2019-07-16 10:17发布

i am developing app, in which i want am image to move along a curve path in the background screen.i am able to move the image from one point to another using the below translate xml, but its moving along a straight path, i want it to move along a curve path.how can i achieve this?

<?xml version="1.0" encoding="utf-8"?>
 <translate xmlns:android="http://schemas.android.com/apk/res/android"
   android:duration="3000"
   android:fromXDelta="-20%"
   android:fromYDelta="-10%"
   android:toXDelta="150%"
   android:toYDelta="-130%"
   android:zAdjustment="normal" />

please help.thanks!

1条回答
女痞
2楼-- · 2019-07-16 10:42
<rotate
    android:toDegrees="360"
    android:pivotX="100%"
    android:pivotY="200%"
    android:duration="6000"
    android:repeatMode="restart"
    android:repeatCount="infinite"/>

Workaround: I used rotate and played with pivotX and pivotY and image position

查看更多
登录 后发表回答