正在查看: 95爱播免登录版 v3.1.9 应用的 MedalMoreActivitys.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 MedalMoreActivitys.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.g;
import androidx.fragment.app.j;
import androidx.viewpager.widget.ViewPager;
import com.android.volley.toolbox.ImageLoader;
import com.mifeng.ui.R;
import com.showself.domain.GetUserMedalParser;
import com.showself.domain.LoginResultInfo;
import com.showself.show.bean.AnchorMedal;
import com.showself.show.bean.UserMedal;
import com.showself.show.fragment.AnchorMedalFragment;
import com.showself.show.fragment.UserMedalFragment;
import com.showself.utils.Utils;
import com.showself.utils.e0;
import com.showself.utils.r0;
import com.showself.utils.u0;
import com.showself.view.ImmersiveStatusBar;
import com.showself.view.PagerSlidingTabStrip;
import com.tencent.tauth.AuthActivity;
import java.util.ArrayList;
import java.util.HashMap;
public class MedalMoreActivitys extends com.showself.ui.c {
private PagerSlidingTabStrip a;
private ViewPager b;
private int c;
private ArrayList<String> d = new ArrayList<>();
private d f2720e;
private int f2721f;
private int f2722g;
private ImageLoader f2723h;
private LoginResultInfo f2724i;
private Button f2725j;
private TextView f2726k;
private TextView l;
private TextView m;
private LinearLayout n;
private ImmersiveStatusBar o;
private int p;
private int q;
private int r;
private String s;
private String t;
private ArrayList<UserMedal> u;
private ArrayList<AnchorMedal> v;
private AnchorMedalFragment w;
private UserMedalFragment x;
private boolean y;
private ImageView z;
class a implements View.OnClickListener {
a() {
}
@Override
public void onClick(View view) {
MedalMoreActivitys.this.finish();
}
}
class b implements com.r.c.d {
b() {
}
@Override
public void onRequestFinish(com.r.c.c cVar, Object obj) {
MedalMoreActivitys.this.L((HashMap) obj);
}
}
class c implements com.r.c.d {
c() {
}
@Override
public void onRequestFinish(com.r.c.c cVar, Object obj) {
MedalMoreActivitys.this.K((HashMap) obj);
}
}
public class d extends j {
private ArrayList<String> f2727g;
public d(g gVar, ArrayList<String> arrayList) {
super(gVar);
this.f2727g = new ArrayList<>();
this.f2727g = arrayList;
}
public int e() {
return this.f2727g.size();
}
public CharSequence g(int i2) {
return this.f2727g.get(i2);
}
public Fragment v(int i2) {
if (i2 == 0) {
MedalMoreActivitys medalMoreActivitys = MedalMoreActivitys.this;
medalMoreActivitys.x = UserMedalFragment.o(medalMoreActivitys.f2722g);
return MedalMoreActivitys.this.x;
}
MedalMoreActivitys medalMoreActivitys2 = MedalMoreActivitys.this;
medalMoreActivitys2.w = AnchorMedalFragment.o(medalMoreActivitys2.f2722g);
return MedalMoreActivitys.this.w;
}
}
public void K(HashMap<Object, Object> hashMap) {
if (hashMap != null) {
int intValue = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue != com.showself.net.e.m1) {
Utils.Z0(this, str);
return;
}
if (hashMap.get("user_max_show") != null) {
this.q = ((Integer) hashMap.get("user_max_show")).intValue();
}
if (hashMap.get("user_level") != null) {
((Integer) hashMap.get("user_level")).intValue();
}
if (hashMap.get("anchor_max_show") != null) {
this.r = ((Integer) hashMap.get("anchor_max_show")).intValue();
}
if (hashMap.get("anchor_level") != null) {
((Integer) hashMap.get("anchor_level")).intValue();
}
this.u = (ArrayList) hashMap.get("medal_user");
this.v = (ArrayList) hashMap.get("medal_anchor");
ArrayList<UserMedal> arrayList = this.u;
if (arrayList != null && arrayList.size() > 0) {
this.x.r(this.u, this.p);
}
ArrayList<AnchorMedal> arrayList2 = this.v;
if (arrayList2 == null || arrayList2.size() <= 0) {
return;
}
this.w.r(this.v, this.p);
}
}
public void L(HashMap<Object, Object> hashMap) {
if (hashMap != null) {
int intValue = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue != com.showself.net.e.m1) {
Utils.Z0(this, str);
return;
}
if (hashMap.get("user_max_show") != null) {
this.q = ((Integer) hashMap.get("user_max_show")).intValue();
}
if (hashMap.get("user_level") != null) {
((Integer) hashMap.get("user_level")).intValue();
}
if (hashMap.get("anchor_max_show") != null) {
this.r = ((Integer) hashMap.get("anchor_max_show")).intValue();
}
if (hashMap.get("anchor_level") != null) {
((Integer) hashMap.get("anchor_level")).intValue();
}
if (hashMap.get("user_level_url") != null) {
this.s = (String) hashMap.get("user_level_url");
}
if (hashMap.get("anchor_level_url") != null) {
this.t = (String) hashMap.get("anchor_level_url");
}
this.u = (ArrayList) hashMap.get("medal_user");
this.v = (ArrayList) hashMap.get("medal_anchor");
ArrayList<UserMedal> arrayList = this.u;
if (arrayList != null && arrayList.size() > 0) {
this.x.r(this.u, this.p);
}
ArrayList<AnchorMedal> arrayList2 = this.v;
if (arrayList2 != null && arrayList2.size() > 0) {
this.w.r(this.v, this.p);
}
I();
}
}
public void G(int i2, int i3) {
com.r.c.a aVar = new com.r.c.a();
aVar.b("medalId", i2);
aVar.b(AuthActivity.ACTION_KEY, i3);
new com.r.c.c(com.r.c.c.k(String.format("v2/medalservice/medals/%s", this.f2722g + "/manage"), 1), aVar, new GetUserMedalParser(this.p), this).y(new c());
}
public void H() {
new com.r.c.c(com.r.c.c.k(String.format("v2/medalservice/medals/%s", this.f2722g + ""), 1), new com.r.c.a(), new GetUserMedalParser(this.p), this).v(new b());
}
public void I() {
this.f2723h.displayImage(this.s, this.z);
this.l.setText(this.q + "");
this.f2726k.setText(getResources().getString(R.string.medal_more_user_level));
}
public void J() {
this.f2723h.displayImage(this.t, this.z);
this.l.setText(this.r + "");
this.f2726k.setText(getResources().getString(R.string.medal_more_star_level));
}
@Override
public void init() {
this.a = (PagerSlidingTabStrip) findViewById(R.id.tabs);
this.b = findViewById(R.id.pager);
this.m = (TextView) findViewById(R.id.tv_nav_title);
this.f2725j = (Button) findViewById(R.id.btn_nav_left);
this.n = (LinearLayout) findViewById(R.id.ll_user_medal);
this.f2726k = (TextView) findViewById(R.id.tv_medal_more_level);
this.z = (ImageView) findViewById(R.id.iv_medal_level);
this.l = (TextView) findViewById(R.id.tv_medal_num);
this.o = (ImmersiveStatusBar) findViewById(2131298726);
this.f2721f = e0.a;
this.c = getResources().getDisplayMetrics().widthPixels;
if (this.y) {
this.m.setText(getResources().getString(R.string.anchor_medal_tip));
this.n.setVisibility(0);
} else {
this.m.setText(getResources().getString(R.string.user_medal_tip));
this.n.setVisibility(8);
}
this.d.add("用户勋章");
this.d.add("蜜疯勋章");
d dVar = new d(getSupportFragmentManager(), this.d);
this.f2720e = dVar;
this.b.setAdapter(dVar);
this.a.v(1, this);
this.a.w(this.b, this, this.c);
this.a.u();
this.a.setDividerStyle(1);
this.a.setIndicatorColor(this.f2721f);
this.a.setCurrentPosition(0);
this.b.setCurrentItem(0);
this.f2725j.setOnClickListener(new a());
H();
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.medal_more_layout);
u0.q(this, null);
this.f2722g = getIntent().getIntExtra("id", 0);
this.f2723h = ImageLoader.getInstance(this);
LoginResultInfo y = r0.y(this);
this.f2724i = y;
if (y.getUserId() == this.f2722g) {
this.p = 1;
this.y = true;
} else {
this.p = 2;
}
init();
u0.i(this, this.o, R.color.navigationbar_bg, true);
}
@Override
protected void onDestroy() {
this.a.v(0, this);
super.onDestroy();
}
@Override
public void refresh(Object... objArr) {
}
}