Animation on Samsungs

1

Hi guys and girls (of course)

I have this animation in my project

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false" >
<rotate
    android:duration="2000"
    android:interpolator="@android:anim/linear_interpolator"
    android:pivotX="50%"
    android:pivotY="50%"
    android:repeatCount="infinite"
    android:repeatMode="restart"
    android:toDegrees="360" />
</set>

and I set it to a button that I put in the action bar

Animation rotate = AnimationUtils.loadAnimation(this, R.anim.rotate_around_center_point);
btnUpdate.startAnimation(rotate);

everything goes as the yield the broken button in its center less in the Samsungs that disappears and not exactly in all the models! What can it be?

    
asked by San Juan 04.10.2017 в 00:13
source

1 answer

0

Hello, try to change the animation as well.

ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(btnUpdate,"rotation", 0f, 360f);
objectAnimator.setDuration(2000);
objectAnimator.setRepeatCount(ObjectAnimator.INFINITE);
objectAnimator.setRepeatMode(ObjectAnimator.RESTART);
objectAnimator.start();

greetings

    
answered by 04.10.2017 в 14:29