- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
78 lines
2.1 KiB
Java
78 lines
2.1 KiB
Java
package com.mbridge.msdk.advanced.view;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.View;
|
|
import android.widget.RelativeLayout;
|
|
import androidx.annotation.NonNull;
|
|
import com.mbridge.msdk.advanced.b.c;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class MBOutNativeAdvancedViewGroup extends RelativeLayout {
|
|
private c a;
|
|
|
|
public void setProvider(c cVar) {
|
|
this.a = cVar;
|
|
}
|
|
|
|
public MBOutNativeAdvancedViewGroup(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public MBOutNativeAdvancedViewGroup(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
}
|
|
|
|
public MBOutNativeAdvancedViewGroup(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
}
|
|
|
|
@Override // android.view.ViewGroup, android.view.View
|
|
public void onAttachedToWindow() {
|
|
super.onAttachedToWindow();
|
|
if (this.a != null) {
|
|
a(1);
|
|
if (getVisibility() == 0) {
|
|
a(2);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.view.ViewGroup, android.view.View
|
|
public void onDetachedFromWindow() {
|
|
super.onDetachedFromWindow();
|
|
c cVar = this.a;
|
|
if (cVar != null) {
|
|
cVar.e(1);
|
|
}
|
|
}
|
|
|
|
@Override // android.view.View
|
|
public void onVisibilityChanged(@NonNull View view, int i) {
|
|
super.onVisibilityChanged(view, i);
|
|
if (i == 0) {
|
|
a(2);
|
|
if (getParent() != null) {
|
|
a(1);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
c cVar = this.a;
|
|
if (cVar != null) {
|
|
cVar.e(2);
|
|
}
|
|
}
|
|
|
|
private void a(final int i) {
|
|
postDelayed(new Runnable() { // from class: com.mbridge.msdk.advanced.view.MBOutNativeAdvancedViewGroup.1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (MBOutNativeAdvancedViewGroup.this.a != null) {
|
|
MBOutNativeAdvancedViewGroup.this.a.d(i);
|
|
}
|
|
}
|
|
}, 200L);
|
|
}
|
|
}
|