what-the-bank/sources/o/VTa.java

67 lines
2.8 KiB
Java

package o;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.util.TypedValue;
import android.view.View;
import com.google.android.material.tabs.TabLayout;
/* loaded from: classes2.dex */
public class VTa {
/* JADX INFO: Access modifiers changed from: package-private */
public static RectF LP_(TabLayout tabLayout, View view) {
if (view == null) {
return new RectF();
}
if (!tabLayout.n && (view instanceof TabLayout.TabView)) {
TabLayout.TabView tabView = (TabLayout.TabView) view;
View[] viewArr = {tabView.j, tabView.i, tabView.g};
int i = 0;
int i2 = 0;
boolean z = false;
for (int i3 = 0; i3 < 3; i3++) {
View view2 = viewArr[i3];
if (view2 != null && view2.getVisibility() == 0) {
i2 = z ? Math.min(i2, view2.getLeft()) : view2.getLeft();
i = z ? Math.max(i, view2.getRight()) : view2.getRight();
z = true;
}
}
int i4 = i - i2;
View[] viewArr2 = {tabView.j, tabView.i, tabView.g};
int i5 = 0;
int i6 = 0;
boolean z2 = false;
for (int i7 = 0; i7 < 3; i7++) {
View view3 = viewArr2[i7];
if (view3 != null && view3.getVisibility() == 0) {
i6 = z2 ? Math.min(i6, view3.getTop()) : view3.getTop();
i5 = z2 ? Math.max(i5, view3.getBottom()) : view3.getBottom();
z2 = true;
}
}
int i8 = i5 - i6;
int applyDimension = (int) TypedValue.applyDimension(1, 24.0f, tabView.getContext().getResources().getDisplayMetrics());
if (i4 < applyDimension) {
i4 = applyDimension;
}
int left = (tabView.getLeft() + tabView.getRight()) / 2;
int top = (tabView.getTop() + tabView.getBottom()) / 2;
int i9 = i4 / 2;
return new RectF(left - i9, top - (i8 / 2), i9 + left, top + (left / 2));
}
return new RectF(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
}
public static void LQ_(TabLayout tabLayout, View view, Drawable drawable) {
RectF LP_ = LP_(tabLayout, view);
drawable.setBounds((int) LP_.left, drawable.getBounds().top, (int) LP_.right, drawable.getBounds().bottom);
}
public void LR_(TabLayout tabLayout, View view, View view2, float f, Drawable drawable) {
RectF LP_ = LP_(tabLayout, view);
RectF LP_2 = LP_(tabLayout, view2);
drawable.setBounds(((int) LP_.left) + Math.round((((int) LP_2.left) - r4) * f), drawable.getBounds().top, ((int) LP_.right) + Math.round(f * (((int) LP_2.right) - r3)), drawable.getBounds().bottom);
}
}