83 lines
3.0 KiB
Java
83 lines
3.0 KiB
Java
|
package o;
|
||
|
|
||
|
import android.animation.ObjectAnimator;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.view.animation.Animation;
|
||
|
import android.view.animation.Transformation;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class fJM {
|
||
|
public static void e(View view) {
|
||
|
view.measure(-1, -2);
|
||
|
int measuredHeight = view.getMeasuredHeight();
|
||
|
view.getLayoutParams().height = 1;
|
||
|
view.setVisibility(0);
|
||
|
Animation animation = new Animation(view, measuredHeight) { // from class: o.fJM.2
|
||
|
private View b;
|
||
|
private int d;
|
||
|
|
||
|
@Override // android.view.animation.Animation
|
||
|
public final boolean willChangeBounds() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.b = view;
|
||
|
this.d = measuredHeight;
|
||
|
}
|
||
|
|
||
|
@Override // android.view.animation.Animation
|
||
|
protected final void applyTransformation(float f, Transformation transformation) {
|
||
|
super.applyTransformation(f, transformation);
|
||
|
this.b.getLayoutParams().height = f >= 1.0f ? -2 : (int) (this.d * f);
|
||
|
this.b.requestLayout();
|
||
|
}
|
||
|
};
|
||
|
animation.setDuration((int) (measuredHeight / view.getContext().getResources().getDisplayMetrics().density));
|
||
|
view.startAnimation(animation);
|
||
|
}
|
||
|
|
||
|
public static void b(View view) {
|
||
|
Object tag = view.getTag(com.scb.phone.R.id.view_rotation);
|
||
|
float floatValue = tag instanceof Float ? ((Float) tag).floatValue() : BitmapDescriptorFactory.HUE_RED;
|
||
|
float f = 180.0f + floatValue;
|
||
|
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(view, "rotation", floatValue, f);
|
||
|
ofFloat.setDuration(150L);
|
||
|
ofFloat.start();
|
||
|
view.setTag(com.scb.phone.R.id.view_rotation, Float.valueOf(f % 360.0f));
|
||
|
}
|
||
|
|
||
|
public static void d(View view) {
|
||
|
Animation animation = new Animation(view, view.getMeasuredHeight()) { // from class: o.fJM.5
|
||
|
private View a;
|
||
|
private int b;
|
||
|
|
||
|
@Override // android.view.animation.Animation
|
||
|
public final boolean willChangeBounds() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.a = view;
|
||
|
this.b = r2;
|
||
|
}
|
||
|
|
||
|
@Override // android.view.animation.Animation
|
||
|
protected final void applyTransformation(float f, Transformation transformation) {
|
||
|
if (f >= 1.0f) {
|
||
|
this.a.setVisibility(8);
|
||
|
return;
|
||
|
}
|
||
|
ViewGroup.LayoutParams layoutParams = this.a.getLayoutParams();
|
||
|
int i = this.b;
|
||
|
layoutParams.height = i - ((int) (i * f));
|
||
|
this.a.requestLayout();
|
||
|
}
|
||
|
};
|
||
|
animation.setDuration((int) (r0 / view.getContext().getResources().getDisplayMetrics().density));
|
||
|
view.startAnimation(animation);
|
||
|
}
|
||
|
}
|