- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
164 lines
6.9 KiB
Java
164 lines
6.9 KiB
Java
package com.mbridge.msdk.dycreator.baseview;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
import android.util.AttributeSet;
|
|
import android.widget.AbsListView;
|
|
import android.widget.GridView;
|
|
import com.fyber.inneractive.sdk.external.InneractiveMediationDefs;
|
|
import com.mbridge.msdk.dycreator.a.b;
|
|
import com.mbridge.msdk.dycreator.baseview.inter.InterBase;
|
|
import com.mbridge.msdk.dycreator.e.a;
|
|
import com.mbridge.msdk.dycreator.e.c;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.same.report.k;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class MBGridView extends GridView implements InterBase {
|
|
private Map<String, String> a;
|
|
private Map<String, Boolean> b;
|
|
private String c;
|
|
|
|
public MBGridView(Context context, AttributeSet attributeSet) {
|
|
super(context);
|
|
this.c = "";
|
|
try {
|
|
this.a = c.a(context, attributeSet);
|
|
a.a(this, attributeSet);
|
|
setLayoutParams(generateLayoutParams(attributeSet));
|
|
c.a(this.a, this);
|
|
} catch (Exception e) {
|
|
af.b("MBGridView", e.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.AbsListView, android.view.ViewGroup
|
|
public AbsListView.LayoutParams generateLayoutParams(AttributeSet attributeSet) {
|
|
AbsListView.LayoutParams layoutParams = (AbsListView.LayoutParams) generateDefaultLayoutParams();
|
|
HashMap<String, com.mbridge.msdk.dycreator.a.c> c = b.a().c();
|
|
int attributeCount = attributeSet.getAttributeCount();
|
|
for (int i = 0; i < attributeCount; i++) {
|
|
com.mbridge.msdk.dycreator.a.c cVar = c.get(attributeSet.getAttributeName(i));
|
|
if (cVar != null) {
|
|
int i2 = AnonymousClass1.a[cVar.ordinal()];
|
|
if (i2 == 1) {
|
|
String attributeValue = attributeSet.getAttributeValue(i);
|
|
if (attributeValue.startsWith(InneractiveMediationDefs.GENDER_FEMALE) || attributeValue.startsWith(InneractiveMediationDefs.GENDER_MALE)) {
|
|
layoutParams.width = -1;
|
|
} else if (attributeValue.startsWith("wrap")) {
|
|
layoutParams.width = -2;
|
|
} else {
|
|
layoutParams.width = b.a().b(attributeValue);
|
|
}
|
|
} else if (i2 == 2) {
|
|
String attributeValue2 = attributeSet.getAttributeValue(i);
|
|
if (attributeValue2.startsWith(InneractiveMediationDefs.GENDER_FEMALE) || attributeValue2.startsWith(InneractiveMediationDefs.GENDER_MALE)) {
|
|
layoutParams.height = -1;
|
|
} else if (attributeValue2.startsWith("wrap")) {
|
|
layoutParams.height = -2;
|
|
} else {
|
|
layoutParams.height = b.a().b(attributeValue2);
|
|
}
|
|
} else if (i2 == 3) {
|
|
setHorizontalFadingEdgeEnabled(attributeSet.getAttributeBooleanValue(i, false));
|
|
} else if (i2 == 4) {
|
|
String attributeValue3 = attributeSet.getAttributeValue(i);
|
|
if (!TextUtils.isEmpty(attributeValue3)) {
|
|
if (attributeValue3.equals("invisible")) {
|
|
setVisibility(4);
|
|
} else if (attributeValue3.equalsIgnoreCase("gone")) {
|
|
setVisibility(8);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return layoutParams;
|
|
}
|
|
|
|
/* renamed from: com.mbridge.msdk.dycreator.baseview.MBGridView$1, reason: invalid class name */
|
|
public static /* synthetic */ class AnonymousClass1 {
|
|
static final /* synthetic */ int[] a;
|
|
|
|
static {
|
|
int[] iArr = new int[com.mbridge.msdk.dycreator.a.c.values().length];
|
|
a = iArr;
|
|
try {
|
|
iArr[com.mbridge.msdk.dycreator.a.c.layout_width.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
a[com.mbridge.msdk.dycreator.a.c.layout_height.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
a[com.mbridge.msdk.dycreator.a.c.fadingEdge.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
a[com.mbridge.msdk.dycreator.a.c.visibility.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.AbsListView, android.view.ViewGroup, android.view.View
|
|
public void onAttachedToWindow() {
|
|
super.onAttachedToWindow();
|
|
Map<String, Boolean> map = this.b;
|
|
if (map != null && map.containsKey("mbridgeAttached") && this.b.get("mbridgeAttached").booleanValue()) {
|
|
new k.a("mbridgeAttached").a().a(this.c);
|
|
}
|
|
}
|
|
|
|
@Override // android.widget.AbsListView, android.widget.AdapterView, android.view.ViewGroup, android.view.View
|
|
public void onDetachedFromWindow() {
|
|
super.onDetachedFromWindow();
|
|
Map<String, Boolean> map = this.b;
|
|
if (map != null && map.containsKey("mbridgeDetached") && this.b.get("mbridgeDetached").booleanValue()) {
|
|
new k.a("mbridgeDetached").a().a(this.c);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getBindDataDes() {
|
|
Map<String, String> map = this.a;
|
|
return (map == null || !map.containsKey("mbridgeData")) ? "" : this.a.get("mbridgeData");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getActionDes() {
|
|
Map<String, String> map = this.a;
|
|
return (map == null || !map.containsKey("mbridgeAction")) ? "" : this.a.get("mbridgeAction");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getStrategyDes() {
|
|
Map<String, String> map = this.a;
|
|
return (map == null || !map.containsKey("mbridgeStrategy")) ? "" : this.a.get("mbridgeStrategy");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getEffectDes() {
|
|
Map<String, String> map = this.a;
|
|
return (map == null || !map.containsKey("mbridgeEffect")) ? "" : this.a.get("mbridgeEffect");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public String getReportDes() {
|
|
Map<String, String> map = this.a;
|
|
return (map == null || !map.containsKey("mbridgeReport")) ? "" : this.a.get("mbridgeReport");
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase
|
|
public void setDynamicReport(String str, CampaignEx campaignEx) {
|
|
this.b = c.a(str);
|
|
if (campaignEx != null) {
|
|
this.c = campaignEx.getCampaignUnitId();
|
|
}
|
|
}
|
|
}
|