jimu-decompiled/sources/com/tencent/open/c/a.java
2025-05-13 19:24:51 +02:00

56 lines
1.7 KiB
Java

package com.tencent.open.c;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.widget.RelativeLayout;
/* compiled from: ProGuard */
/* loaded from: classes.dex */
public class a extends RelativeLayout {
private static final String a = a.class.getName();
private Rect b;
private boolean c;
private InterfaceC0018a d;
/* compiled from: ProGuard */
/* renamed from: com.tencent.open.c.a$a, reason: collision with other inner class name */
public interface InterfaceC0018a {
void a();
void a(int i);
}
public a(Context context) {
super(context);
this.b = null;
this.c = false;
this.d = null;
if (this.b == null) {
this.b = new Rect();
}
}
public void a(InterfaceC0018a interfaceC0018a) {
this.d = interfaceC0018a;
}
@Override // android.widget.RelativeLayout, android.view.View
protected void onMeasure(int i, int i2) {
int size = View.MeasureSpec.getSize(i2);
Activity activity = (Activity) getContext();
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(this.b);
int height = (activity.getWindowManager().getDefaultDisplay().getHeight() - this.b.top) - size;
InterfaceC0018a interfaceC0018a = this.d;
if (interfaceC0018a != null && size != 0) {
if (height > 100) {
interfaceC0018a.a((Math.abs(this.b.height()) - getPaddingBottom()) - getPaddingTop());
} else {
interfaceC0018a.a();
}
}
super.onMeasure(i, i2);
}
}