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

48 lines
1.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
/* loaded from: classes5.dex */
public final class fJO {
FrameLayout.LayoutParams a;
View b;
int c;
public fJO(Activity activity) {
View childAt = ((FrameLayout) activity.findViewById(android.R.id.content)).getChildAt(0);
this.b = childAt;
childAt.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(this) { // from class: o.fJP
private fJO b;
@Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
public final void onGlobalLayout() {
fJO fjo = this.b;
Rect rect = new Rect();
fjo.b.getWindowVisibleDisplayFrame(rect);
int i = rect.bottom - rect.top;
if (i != fjo.c) {
int height = fjo.b.getRootView().getHeight();
int i2 = height - i;
if (i2 > height / 4) {
((ViewGroup.LayoutParams) fjo.a).height = height - i2;
} else {
((ViewGroup.LayoutParams) fjo.a).height = -1;
}
fjo.b.requestLayout();
fjo.c = i;
}
}
{
this.b = this;
}
});
this.a = (FrameLayout.LayoutParams) this.b.getLayoutParams();
}
}