控件横向来回抖动

    xiaoxiao2021-03-25  49

    ObjectAnimator anim = ObjectAnimator.ofFloat(mLtWord, "translationX", -20,20,-10,10,-5,5,0); anim.setDuration(1000); anim.start();

      

    摇晃动画

    <?xml version="1.0" encoding="utf-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="300" android:fromDegrees="10" android:pivotX="100%" android:pivotY="100%" android:repeatCount="infinite" android:repeatMode="reverse" android:toDegrees="-10"/> Animation animation = AnimationUtils.loadAnimation(this, R.anim.screen_ad_shake); animation.reset(); animation.setFillAfter(true); ivAdDisplay.startAnimation(animation);

    转载请注明原文地址: https://ju.6miu.com/read-34138.html

    最新回复(0)