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

90 lines
3.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
/* loaded from: classes.dex */
public final class VPK extends RecyclerView.ZqN {
private static final int[] e = {android.R.attr.listDivider};
private int a;
public Drawable b;
private final Rect c = new Rect();
public VPK(Context context) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(e);
this.b = obtainStyledAttributes.getDrawable(0);
obtainStyledAttributes.recycle();
this.a = 1;
}
@Override // androidx.recyclerview.widget.RecyclerView.ZqN
public final void apG_(Rect rect, View view, RecyclerView recyclerView, RecyclerView.AcL acL) {
Drawable drawable = this.b;
if (drawable == null) {
rect.set(0, 0, 0, 0);
} else if (this.a == 1) {
rect.set(0, 0, 0, drawable.getIntrinsicHeight());
} else {
rect.set(0, 0, drawable.getIntrinsicWidth(), 0);
}
}
@Override // androidx.recyclerview.widget.RecyclerView.ZqN
public final void apA_(Canvas canvas, RecyclerView recyclerView) {
int height;
int i;
int width;
int i2;
if (recyclerView.x == null || this.b == null) {
return;
}
int i3 = 0;
if (this.a == 1) {
canvas.save();
if (recyclerView.getClipToPadding()) {
i2 = recyclerView.getPaddingLeft();
width = recyclerView.getWidth() - recyclerView.getPaddingRight();
canvas.clipRect(i2, recyclerView.getPaddingTop(), width, recyclerView.getHeight() - recyclerView.getPaddingBottom());
} else {
width = recyclerView.getWidth();
i2 = 0;
}
int childCount = recyclerView.getChildCount();
while (i3 < childCount) {
View childAt = recyclerView.getChildAt(i3);
RecyclerView.Aa_(childAt, this.c);
int round = this.c.bottom + Math.round(childAt.getTranslationY());
this.b.setBounds(i2, round - this.b.getIntrinsicHeight(), width, round);
this.b.draw(canvas);
i3++;
}
canvas.restore();
return;
}
canvas.save();
if (recyclerView.getClipToPadding()) {
i = recyclerView.getPaddingTop();
height = recyclerView.getHeight() - recyclerView.getPaddingBottom();
canvas.clipRect(recyclerView.getPaddingLeft(), i, recyclerView.getWidth() - recyclerView.getPaddingRight(), height);
} else {
height = recyclerView.getHeight();
i = 0;
}
int childCount2 = recyclerView.getChildCount();
while (i3 < childCount2) {
View childAt2 = recyclerView.getChildAt(i3);
recyclerView.x.It_(childAt2, this.c);
int round2 = this.c.right + Math.round(childAt2.getTranslationX());
this.b.setBounds(round2 - this.b.getIntrinsicWidth(), i, round2, height);
this.b.draw(canvas);
i3++;
}
canvas.restore();
}
}