OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 ContactUsFragment.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.TextView;
import com.excelliance.kxqp.bitmap.model.ResponseData;
import com.excelliance.kxqp.d.d;
import com.excelliance.kxqp.d.f;
import com.excelliance.kxqp.gs.base.BaseLazyFragment;
import com.excelliance.kxqp.gs.base.e;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.bp;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.w;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class ContactUsFragment extends BaseLazyFragment {
public List<c> f8250a;
@Override
public e e() {
return null;
}
@Override
protected void b() {
GridView gridView = (GridView) com.excelliance.kxqp.ui.util.b.a("lv_1", this.f);
GridView gridView2 = (GridView) com.excelliance.kxqp.ui.util.b.a("lv_3", this.f);
ArrayList arrayList = new ArrayList();
arrayList.add(new b(this, com.excelliance.kxqp.swipe.a.a.getString(this.d, "public_number_title"), com.excelliance.kxqp.swipe.a.a.getString(this.d, "public_number"), 4, true, "ic_public_number"));
arrayList.add(new b(this, com.excelliance.kxqp.swipe.a.a.getString(this.d, "weibo_title"), com.excelliance.kxqp.swipe.a.a.getString(this.d, "weibo_number"), 5, true, "ic_weibo_number"));
arrayList.add(new b(this, com.excelliance.kxqp.swipe.a.a.getString(this.d, "douyin_title"), com.excelliance.kxqp.swipe.a.a.getString(this.d, "douyin_number"), 12, true, "ic_douyin_number"));
arrayList.add(new b(this, com.excelliance.kxqp.swipe.a.a.getString(this.d, "bili_title"), com.excelliance.kxqp.swipe.a.a.getString(this.d, "bili_number"), 7, true, "ic_bili"));
gridView.setAdapter((ListAdapter) new a(this.d, arrayList));
ArrayList arrayList2 = new ArrayList();
arrayList2.add(new b(this, com.excelliance.kxqp.swipe.a.a.getString(this.d, "e_mail"), com.excelliance.kxqp.swipe.a.a.getString(this.d, "e_mail_number"), 3, true, "ic_e_mail"));
gridView2.setAdapter((ListAdapter) new a(this.d, arrayList2));
a();
if (com.excelliance.kxqp.gs.newappstore.b.c.a(this.d)) {
View a2 = com.excelliance.kxqp.ui.util.b.a("view_1_flag", this.f);
View a3 = com.excelliance.kxqp.ui.util.b.a("view_2_flag", this.f);
View a4 = com.excelliance.kxqp.ui.util.b.a("view_3_flag", this.f);
a2.setBackgroundColor(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
a3.setBackgroundColor(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
a4.setBackgroundColor(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
}
}
public void a(List<c> list) {
if (list.isEmpty()) {
return;
}
this.f8250a = list;
com.excelliance.kxqp.ui.util.b.a("tv_2", this.f).setVisibility(0);
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
c cVar = list.get(i);
az.d("ContactUsFragment", "loadQQInfo: " + cVar.toString());
arrayList.add(new b(cVar.f8259a, cVar.c, 2, true, "ic_qq_group", i + ""));
}
((GridView) com.excelliance.kxqp.ui.util.b.a("lv_2", this.f)).setAdapter((ListAdapter) new a(this.d, arrayList));
}
public void a() {
tp.f(new Runnable() {
@Override
public void run() {
String b2 = by.a(ContactUsFragment.this.d, "feedback").b("qq_info", (String) null);
if (!TextUtils.isEmpty(b2)) {
ContactUsFragment.this.a(b2, true);
}
ContactUsFragment.this.a(bd.a("http://api.ourplay.com.cn/feedback/get-qq-groups", 10000, 10000), false);
}
});
}
public void a(final String str, final boolean z) {
if (str != null) {
try {
String a2 = bp.a(str, "fuck_snsslmm_bslznw", "utf-8");
Gson gson = new Gson();
az.d("ContactUsFragment", "run: " + a2);
final ResponseData responseData = (ResponseData) gson.a(a2, new TypeToken<ResponseData<List<c>>>() {
}.getType());
if (responseData == null || responseData.data == 0) {
return;
}
tp.i(new Runnable() {
@Override
public void run() {
boolean z2;
if (!z) {
by a3 = by.a(ContactUsFragment.this.d, "feedback");
if (TextUtils.equals(a3.b("qq_info", (String) null), str)) {
z2 = false;
if (z2) {
return;
}
ContactUsFragment.this.a((List<c>) responseData.data);
return;
}
a3.a("qq_info", str);
}
z2 = true;
if (z2) {
}
}
});
} catch (JsonSyntaxException e) {
e.printStackTrace();
}
}
}
@Override
protected int d() {
return com.excelliance.kxqp.swipe.a.a.a(this.d, "contact_us_fragment");
}
@Override
public void singleClick(View view) {
super.singleClick(view);
Integer valueOf = Integer.valueOf((String) view.getTag(com.excelliance.kxqp.ui.util.b.a()));
switch (valueOf.intValue()) {
case 2:
try {
c cVar = this.f8250a.get(Integer.parseInt(((b) view.getTag(com.excelliance.kxqp.ui.util.b.b())).f));
if (cVar.e != null && !cVar.e.isEmpty()) {
ContactUsItemFragment contactUsItemFragment = new ContactUsItemFragment();
contactUsItemFragment.f8250a = cVar.e;
getActivity().getSupportFragmentManager().beginTransaction().add(com.excelliance.kxqp.swipe.a.a.getId(this.d, "fl_content"), contactUsItemFragment).addToBackStack(cVar.f8259a).commit();
} else if (!TextUtils.isEmpty(cVar.d)) {
new d();
d.a(this.d, cVar.d);
} else {
Log.e("ContactUsFragment", "singleClick: qqInfo " + valueOf);
}
return;
} catch (Exception e) {
e.printStackTrace();
return;
}
case 3:
try {
String str = ((b) view.getTag(com.excelliance.kxqp.ui.util.b.b())).f8258b;
if (TextUtils.isEmpty(str)) {
str = w.e(this.d, "e_mail_number");
}
startActivity(new Intent("android.intent.action.SENDTO", Uri.parse("mailto: " + str)));
return;
} catch (Exception unused) {
return;
}
case 4:
new f().e(this.d);
return;
case 5:
new com.excelliance.kxqp.d.e().b(this.d);
return;
case 6:
case 8:
case 9:
case 10:
case 11:
default:
return;
case 7:
new com.excelliance.kxqp.d.b().b(this.d);
return;
case 12:
new com.excelliance.kxqp.d.c().b(this.d);
return;
}
}
public class a extends com.excelliance.kxqp.gs.base.a {
public String c;
public a(Context context, List<b> list) {
super(context, list);
this.c = "contact_us_item";
}
public a(ContactUsFragment contactUsFragment, Context context, List<b> list, String str) {
this(context, list);
this.c = str;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
C0329a c0329a;
String str;
if (view == null || view.getTag() == null || !(view.getTag() instanceof C0329a)) {
c0329a = new C0329a();
view = com.excelliance.kxqp.swipe.a.a.getLayout(this.f4323a, this.c);
view.setLayoutParams(new AbsListView.LayoutParams(-1, com.excelliance.kxqp.swipe.a.a.dip2px(this.f4323a, 60.0f)));
c0329a.f8256b = (ImageView) com.excelliance.kxqp.ui.util.b.a("ic", view);
c0329a.c = (ImageView) com.excelliance.kxqp.ui.util.b.a("iv_arrow", view);
c0329a.d = (TextView) com.excelliance.kxqp.ui.util.b.a("tv_title", view);
c0329a.e = (TextView) com.excelliance.kxqp.ui.util.b.a("tv_number", view);
c0329a.f = (TextView) com.excelliance.kxqp.ui.util.b.a("tv_copy", view);
c0329a.f8255a = view;
} else {
c0329a = (C0329a) view.getTag();
}
if (i < this.f4324b.size()) {
b item = getItem(i);
c0329a.f8256b.setImageDrawable(com.excelliance.kxqp.swipe.a.a.getDrawable(this.f4323a, item.e));
TextView textView = c0329a.d;
if (TextUtils.isEmpty(item.f8258b)) {
str = item.f8257a;
} else {
str = item.f8257a.trim().replaceAll("[::]$", "") + ": ";
}
textView.setText(str);
c0329a.e.setText(item.f8258b);
c0329a.f.setVisibility(!item.d ? 0 : 8);
c0329a.c.setVisibility(item.d ? 0 : 8);
com.excelliance.kxqp.ui.util.b.a(c0329a.f8255a, ContactUsFragment.this, item.c + "", item);
}
return view;
}
@Override
public b getItem(int i) {
if (this.f4324b == null) {
return null;
}
return (b) this.f4324b.get(i);
}
public class C0329a {
View f8255a;
ImageView f8256b;
ImageView c;
TextView d;
TextView e;
TextView f;
public C0329a() {
}
}
}
public class b {
public String f8257a;
public String f8258b;
public int c;
public boolean d;
public String e;
public String f;
public b(String str, String str2, int i, boolean z, String str3, String str4) {
this.f8257a = str;
this.f8258b = str2;
this.c = i;
this.d = z;
this.e = str3;
this.f = str4;
}
public b(ContactUsFragment contactUsFragment, String str, String str2, int i, boolean z, String str3) {
this(str, str2, i, z, str3, str2);
}
}
public static class c implements Serializable {
@SerializedName("name")
public String f8259a;
@SerializedName("type")
public String f8260b;
@SerializedName("qq")
public String c;
@SerializedName("key")
public String d;
@SerializedName("sub_type")
public List<c> e;
public String toString() {
return "QQInfo{name='" + this.f8259a + "', type='" + this.f8260b + "', qq='" + this.c + "', key='" + this.d + "', sub_type=" + this.e + '}';
}
}
}