discord-jadx/app/src/main/java/b/q/a/b.java

43 lines
1.5 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.q.a;
2021-08-03 07:33:18 +00:00
import android.view.View;
import android.view.ViewGroup;
import com.yalantis.ucrop.UCropActivity;
import com.yalantis.ucrop.view.GestureCropImageView;
import com.yalantis.ucrop.view.widget.AspectRatioTextView;
import java.util.Iterator;
2022-03-07 09:34:54 +00:00
/* compiled from: UCropActivity.java */
/* loaded from: classes3.dex */
2021-08-03 07:33:18 +00:00
public class b implements View.OnClickListener {
2021-12-02 18:53:44 +00:00
public final /* synthetic */ UCropActivity j;
2021-08-03 07:33:18 +00:00
public b(UCropActivity uCropActivity) {
2021-12-02 18:53:44 +00:00
this.j = uCropActivity;
2021-08-03 07:33:18 +00:00
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
2021-12-02 18:53:44 +00:00
GestureCropImageView gestureCropImageView = this.j.w;
2021-08-03 07:33:18 +00:00
AspectRatioTextView aspectRatioTextView = (AspectRatioTextView) ((ViewGroup) view).getChildAt(0);
if (view.isSelected()) {
2021-12-02 18:53:44 +00:00
if (aspectRatioTextView.m != 0.0f) {
float f = aspectRatioTextView.o;
float f2 = aspectRatioTextView.p;
aspectRatioTextView.o = f2;
aspectRatioTextView.p = f;
aspectRatioTextView.m = f2 / f;
2021-08-03 07:33:18 +00:00
}
aspectRatioTextView.b();
}
2021-12-02 18:53:44 +00:00
gestureCropImageView.setTargetAspectRatio(aspectRatioTextView.m);
this.j.w.setImageToWrapCropBounds(true);
2021-08-03 07:33:18 +00:00
if (!view.isSelected()) {
2021-12-02 18:53:44 +00:00
Iterator<ViewGroup> it = this.j.E.iterator();
2021-08-03 07:33:18 +00:00
while (it.hasNext()) {
ViewGroup next = it.next();
next.setSelected(next == view);
}
}
}
}