130 lines
4.4 KiB
Java
130 lines
4.4 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.graphics.Rect;
|
||
|
import android.util.AttributeSet;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||
|
import androidx.core.view.ViewCompat;
|
||
|
import androidx.core.view.WindowInsetsCompat;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import java.util.List;
|
||
|
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public abstract class FTl extends JFA<View> {
|
||
|
private Rect a;
|
||
|
public final Rect b;
|
||
|
public int c;
|
||
|
private int e;
|
||
|
|
||
|
protected float b(View view) {
|
||
|
return 1.0f;
|
||
|
}
|
||
|
|
||
|
protected abstract View c(List<View> list);
|
||
|
|
||
|
protected boolean e() {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public FTl() {
|
||
|
this.b = new Rect();
|
||
|
this.a = new Rect();
|
||
|
this.e = 0;
|
||
|
}
|
||
|
|
||
|
public FTl(Context context, AttributeSet attributeSet) {
|
||
|
super(context, attributeSet);
|
||
|
this.b = new Rect();
|
||
|
this.a = new Rect();
|
||
|
this.e = 0;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.coordinatorlayout.widget.CoordinatorLayout.Sts
|
||
|
public boolean a(CoordinatorLayout coordinatorLayout, View view, int i, int i2, int i3, int i4) {
|
||
|
View c;
|
||
|
WindowInsetsCompat windowInsetsCompat;
|
||
|
int i5 = view.getLayoutParams().height;
|
||
|
if ((i5 != -1 && i5 != -2) || (c = c(coordinatorLayout.c(view))) == null) {
|
||
|
return false;
|
||
|
}
|
||
|
int size = View.MeasureSpec.getSize(i3);
|
||
|
if (size > 0) {
|
||
|
if (ViewCompat.l(c) && (windowInsetsCompat = coordinatorLayout.b) != null) {
|
||
|
size += windowInsetsCompat.i() + windowInsetsCompat.f();
|
||
|
}
|
||
|
} else {
|
||
|
size = coordinatorLayout.getHeight();
|
||
|
}
|
||
|
int c2 = size + c(c);
|
||
|
int measuredHeight = c.getMeasuredHeight();
|
||
|
if (e()) {
|
||
|
view.setTranslationY(-measuredHeight);
|
||
|
} else {
|
||
|
view.setTranslationY(BitmapDescriptorFactory.HUE_RED);
|
||
|
c2 -= measuredHeight;
|
||
|
}
|
||
|
coordinatorLayout.a(view, i, i2, View.MeasureSpec.makeMeasureSpec(c2, i5 == -1 ? 1073741824 : PKIFailureInfo.systemUnavail), i4);
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
@Override // o.JFA
|
||
|
public final void b(CoordinatorLayout coordinatorLayout, View view, int i) {
|
||
|
View c = c(coordinatorLayout.c(view));
|
||
|
if (c != null) {
|
||
|
CoordinatorLayout.RVV rvv = (CoordinatorLayout.RVV) view.getLayoutParams();
|
||
|
Rect rect = this.b;
|
||
|
int paddingLeft = coordinatorLayout.getPaddingLeft();
|
||
|
int i2 = ((ViewGroup.MarginLayoutParams) rvv).leftMargin;
|
||
|
int bottom = c.getBottom();
|
||
|
int i3 = ((ViewGroup.MarginLayoutParams) rvv).topMargin;
|
||
|
int width = coordinatorLayout.getWidth();
|
||
|
int paddingRight = coordinatorLayout.getPaddingRight();
|
||
|
rect.set(paddingLeft + i2, bottom + i3, (width - paddingRight) - ((ViewGroup.MarginLayoutParams) rvv).rightMargin, ((coordinatorLayout.getHeight() + c.getBottom()) - coordinatorLayout.getPaddingBottom()) - ((ViewGroup.MarginLayoutParams) rvv).bottomMargin);
|
||
|
WindowInsetsCompat windowInsetsCompat = coordinatorLayout.b;
|
||
|
if (windowInsetsCompat != null && ViewCompat.l(coordinatorLayout) && !ViewCompat.l(view)) {
|
||
|
rect.left += windowInsetsCompat.g();
|
||
|
rect.right -= windowInsetsCompat.j();
|
||
|
}
|
||
|
Rect rect2 = this.a;
|
||
|
int i4 = rvv.c;
|
||
|
if (i4 == 0) {
|
||
|
i4 = 8388659;
|
||
|
}
|
||
|
HpP.ro_(i4, view.getMeasuredWidth(), view.getMeasuredHeight(), rect, rect2, i);
|
||
|
int d = d(c);
|
||
|
view.layout(rect2.left, rect2.top - d, rect2.right, rect2.bottom - d);
|
||
|
this.e = rect2.top - c.getBottom();
|
||
|
return;
|
||
|
}
|
||
|
super.b(coordinatorLayout, view, i);
|
||
|
this.e = 0;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final int d(View view) {
|
||
|
if (this.c == 0) {
|
||
|
return 0;
|
||
|
}
|
||
|
float b = b(view);
|
||
|
int i = this.c;
|
||
|
int i2 = (int) (b * i);
|
||
|
if (i2 < 0) {
|
||
|
return 0;
|
||
|
}
|
||
|
return i2 > i ? i : i2;
|
||
|
}
|
||
|
|
||
|
public int c(View view) {
|
||
|
return view.getMeasuredHeight();
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final int b() {
|
||
|
return this.e;
|
||
|
}
|
||
|
}
|