30 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| package com.ubt.jimu.utils;
 | |
| 
 | |
| import android.animation.ObjectAnimator;
 | |
| import android.os.Build;
 | |
| import android.view.animation.AccelerateDecelerateInterpolator;
 | |
| import android.view.animation.Animation;
 | |
| import android.view.animation.CycleInterpolator;
 | |
| import android.view.animation.TranslateAnimation;
 | |
| import android.widget.ProgressBar;
 | |
| 
 | |
| /* loaded from: classes2.dex */
 | |
| public class AnimUtils {
 | |
|     public static Animation a(int i) {
 | |
|         TranslateAnimation translateAnimation = new TranslateAnimation(0.0f, 10.0f, 0.0f, 0.0f);
 | |
|         translateAnimation.setInterpolator(new CycleInterpolator(i));
 | |
|         translateAnimation.setDuration(1000L);
 | |
|         return translateAnimation;
 | |
|     }
 | |
| 
 | |
|     public static void a(ProgressBar progressBar, int i) {
 | |
|         if (Build.VERSION.SDK_INT < 11) {
 | |
|             return;
 | |
|         }
 | |
|         ObjectAnimator ofInt = ObjectAnimator.ofInt(progressBar, "progress", 0, i);
 | |
|         ofInt.setInterpolator(new AccelerateDecelerateInterpolator());
 | |
|         ofInt.setDuration(1400L);
 | |
|         ofInt.start();
 | |
|     }
 | |
| }
 |