正在查看: 95爱播免登录版 v3.1.9 应用的 GiftActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 GiftActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.android.volley.toolbox.ImageLoader;
import com.mifeng.ui.R;
import com.r.b.g0;
import com.r.b.i0;
import com.showself.domain.GiftInfo;
import com.showself.domain.PropInfo;
import com.showself.resource.ResourceManager;
import com.showself.utils.Utils;
import com.showself.utils.k0;
import com.showself.utils.l;
import com.showself.utils.r0;
import com.showself.view.EnCustomTabView;
import com.showself.view.PullToRefreshView;
import com.showself.view.q;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.PrivacyItem;
public class GiftActivity extends com.showself.ui.c implements PullToRefreshView.b {
public static int x = 1;
private int a;
private ListView b;
private PullToRefreshView c;
private g0 d;
private i0 f2634e;
private List<PropInfo> f2637h;
ImageLoader l;
private TextView m;
private j q;
private int r;
private String s;
private String t;
private int u;
private List<GiftInfo> f2635f = new ArrayList();
private List<GiftInfo> f2636g = new ArrayList();
private int f2638i = 0;
private int f2639j = 20;
private int f2640k = 0;
int n = 1;
private int o = 0;
private int p = 0;
private Map<String, String> v = new HashMap();
public Handler w = new a();
class a extends Handler {
a() {
}
@Override
public void handleMessage(Message message) {
if (message.what != 10) {
return;
}
GiftActivity.this.m.setText(GiftActivity.this.getString(R.string.my_money) + GiftActivity.this.p);
if (GiftActivity.this.p <= 999) {
GiftActivity.this.v.put("金币", "0-999");
} else if (GiftActivity.this.p <= 9999) {
GiftActivity.this.v.put("金币", "1000-9999");
} else if (GiftActivity.this.p <= 49999) {
GiftActivity.this.v.put("金币", "10000-49999");
} else if (GiftActivity.this.p <= 99999) {
GiftActivity.this.v.put("金币", "50000-99999");
} else if (GiftActivity.this.p <= 499999) {
GiftActivity.this.v.put("金币", "100000-499999");
} else if (GiftActivity.this.p <= 999999) {
GiftActivity.this.v.put("金币", "500000-999999");
} else if (1000000 <= GiftActivity.this.p) {
GiftActivity.this.v.put("金币", "1000000-");
}
if (GiftActivity.this.o == 0) {
GiftActivity.this.d.c(GiftActivity.this.o);
GiftActivity.this.d.b(GiftActivity.this.f2635f);
} else {
GiftActivity.this.d.c(GiftActivity.this.o);
GiftActivity.this.d.b(GiftActivity.this.f2636g);
}
}
}
class b implements EnCustomTabView.b {
b() {
}
@Override
public void a(EnCustomTabView enCustomTabView, int i2) {
GiftActivity.this.U(i2 + 1);
}
}
class c implements l {
c() {
}
@Override
public void a(boolean z) {
if (z) {
GiftActivity.this.startActivity(new Intent(GiftActivity.this.getApplicationContext(), (Class<?>) VIPActivity.class));
}
}
}
class d implements l {
d() {
}
@Override
public void a(boolean z) {
if (z) {
GiftActivity.this.startActivity(new Intent(GiftActivity.this.getApplicationContext(), (Class<?>) VIPActivity.class));
}
}
}
class e implements l {
e() {
}
@Override
public void a(boolean z) {
if (z) {
com.showself.utils.c1.e.a(GiftActivity.this);
}
}
}
class f implements View.OnClickListener {
final PropInfo a;
final q b;
f(PropInfo propInfo, q qVar) {
this.a = propInfo;
this.b = qVar;
}
@Override
public void onClick(View view) {
if (GiftActivity.this.o == 2) {
GiftActivity.this.r = this.a.getAdmin_pid();
GiftActivity.this.t = this.a.getName();
GiftActivity.this.s = this.a.getImage();
GiftActivity giftActivity = GiftActivity.this;
giftActivity.T(giftActivity.f2640k, GiftActivity.this.r + "", 102, "");
}
this.b.a();
}
}
class g implements View.OnClickListener {
final q a;
g(GiftActivity giftActivity, q qVar) {
this.a = qVar;
}
@Override
public void onClick(View view) {
this.a.a();
}
}
class h implements View.OnClickListener {
final GiftInfo a;
final q b;
h(GiftInfo giftInfo, q qVar) {
this.a = giftInfo;
this.b = qVar;
}
@Override
public void onClick(View view) {
if (GiftActivity.this.o == 0) {
GiftActivity.this.r = this.a.getGiftId();
GiftActivity.this.t = this.a.getName();
GiftActivity.this.s = this.a.getImage();
GiftActivity giftActivity = GiftActivity.this;
giftActivity.T(giftActivity.f2640k, GiftActivity.this.r + "", 0, "");
} else if (GiftActivity.this.o == 1) {
GiftActivity.this.r = this.a.getGiftId();
GiftActivity.this.t = this.a.getName();
GiftActivity.this.s = this.a.getImage();
GiftActivity giftActivity2 = GiftActivity.this;
giftActivity2.T(giftActivity2.f2640k, GiftActivity.this.r + "", 101, "");
}
this.b.a();
}
}
class i implements View.OnClickListener {
final q a;
i(GiftActivity giftActivity, q qVar) {
this.a = qVar;
}
@Override
public void onClick(View view) {
this.a.a();
}
}
private class j implements View.OnClickListener {
private j() {
}
@Override
public void onClick(View view) {
if (view.getId() != 2131296486) {
return;
}
GiftActivity.this.finish();
}
j(GiftActivity giftActivity, a aVar) {
this();
}
}
private void O(String str) {
Utils.Q0(this, getString(2131690737), str, getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new e(), true);
}
private void Q(int i2, int i3) {
HashMap hashMap = new HashMap();
hashMap.put("startindex", Integer.valueOf(i2));
hashMap.put("recordnum", Integer.valueOf(i3));
addTask(new com.showself.service.f(10053, hashMap), getApplicationContext());
}
public void T(int i2, String str, int i3, String str2) {
HashMap hashMap = new HashMap();
hashMap.put("fuid", Integer.valueOf(i2));
hashMap.put("type", Integer.valueOf(i3));
hashMap.put("gids", str);
hashMap.put("note", str2);
addTask(new com.showself.service.f(10057, hashMap), getApplicationContext());
}
public void U(int i2) {
V(i2 == 1 ? "gift" : i2 == 2 ? "vip" : i2 == 3 ? "packsack" : null);
}
private void V(String str) {
if (str.endsWith("gift")) {
this.o = 0;
this.b.setAdapter((ListAdapter) this.d);
this.d.c(this.o);
this.d.b(this.f2635f);
return;
}
if (str.endsWith("vip")) {
this.o = 1;
this.b.setAdapter((ListAdapter) this.d);
this.d.c(this.o);
this.d.b(this.f2636g);
return;
}
if (str.endsWith("packsack")) {
this.o = 2;
this.b.setAdapter((ListAdapter) this.f2634e);
this.f2634e.a(this.f2637h);
}
}
public void P(int i2, GiftInfo giftInfo) {
k0 k2 = k0.k();
if (giftInfo.getGiftId() != 9999) {
if (k2.v() < giftInfo.getVip_level()) {
Utils.Q0(this, getString(2131690737), getString(R.string.vip_level_alert1), getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new d(), true);
return;
} else {
z(giftInfo);
return;
}
}
Intent intent = new Intent(getApplicationContext(), (Class<?>) AuctionActivity.class);
intent.putExtra("fuid", this.f2640k);
intent.putExtra("gid", 9999);
intent.putExtra("gift_image", this.f2635f.get(i2).getImage());
startActivity(intent);
}
public void R(int i2, PropInfo propInfo) {
if (k0.k().v() < propInfo.getVip_level()) {
Utils.Q0(this, getString(2131690737), getString(R.string.vip_level_alert1), getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new c(), true);
} else {
S(propInfo);
}
}
public void S(PropInfo propInfo) {
q qVar = new q();
View inflate = View.inflate(this, R.layout.show_prop_dialog, null);
this.l.displayImage(propInfo.getImage(), (ImageView) inflate.findViewById(R.id.iv_show_prop_pic));
((TextView) inflate.findViewById(R.id.tv_content)).setText(propInfo.getName());
((TextView) inflate.findViewById(R.id.tv_show_prop_gold)).setVisibility(8);
((TextView) inflate.findViewById(R.id.tv_show_prop_renewals)).setVisibility(8);
TextView textView = (TextView) inflate.findViewById(R.id.show_prop_descr);
textView.setText("价格:" + propInfo.getSpend() + "\n" + getString(R.string.service_time_add) + propInfo.getValid() + propInfo.getUnit());
textView.setGravity(17);
Button button = (Button) inflate.findViewById(R.id.bt_buy);
button.setText("赠送");
button.setOnClickListener(new f(propInfo, qVar));
inflate.findViewById(2131297087).setOnClickListener(new g(this, qVar));
qVar.j(this, inflate, 1.0f, 17, R.style.anim_sclae_inout_style);
}
@Override
public void init() {
((TextView) findViewById(R.id.tv_nav_title)).setText(R.string.card_user_sucess_gift);
Button button = (Button) findViewById(R.id.btn_nav_left);
j jVar = new j(this, null);
this.q = jVar;
button.setOnClickListener(jVar);
this.b = (ListView) findViewById(R.id.lv_gift_photo);
PullToRefreshView pullToRefreshView = (PullToRefreshView) findViewById(R.id.refresh_gift);
this.c = pullToRefreshView;
pullToRefreshView.setOnHeaderRefreshListener(this);
this.m = (TextView) findViewById(R.id.tv_gift_money);
g0 g0Var = new g0(this.f2635f, this);
this.d = g0Var;
this.b.setAdapter((ListAdapter) g0Var);
this.d.notifyDataSetChanged();
this.f2634e = new i0(this, this.f2637h);
r0.y(ShowSelfApp.h().getApplicationContext()).getGender();
this.v.put("性别", "0");
EnCustomTabView enCustomTabView = (EnCustomTabView) findViewById(R.id.custom_tab_view_friend);
enCustomTabView.g(new String[]{"礼物包", "会员包", "道具包"}, this.n - 1);
enCustomTabView.setTabListener(new b());
U(this.n);
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.f1210gift);
init();
this.c.f();
Bundle extras = getIntent().getExtras();
this.f2640k = extras.getInt("fuid");
if (extras.containsKey(PrivacyItem.PrivacyRule.SUBSCRIPTION_FROM)) {
this.a = extras.getInt(PrivacyItem.PrivacyRule.SUBSCRIPTION_FROM);
}
if (extras.containsKey("gift")) {
this.u = extras.getInt("gift");
}
this.l = ImageLoader.getInstance(this);
}
@Override
protected void onDestroy() {
List<GiftInfo> list = this.f2635f;
if (list != null) {
list.clear();
this.f2635f = null;
}
List<GiftInfo> list2 = this.f2636g;
if (list2 != null) {
list2.clear();
this.f2636g = null;
}
super.onDestroy();
}
protected void onRestart() {
super/*android.app.Activity*/.onRestart();
this.c.f();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onStop() {
super.onStop();
}
@Override
public void p(PullToRefreshView pullToRefreshView) {
Q(this.f2638i, this.f2639j);
}
@Override
public void refresh(Object... objArr) {
com.showself.service.g.i(this);
this.c.k();
int intValue = ((Integer) objArr[0]).intValue();
HashMap hashMap = (HashMap) objArr[1];
if (hashMap != null) {
int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue == 10053) {
if (intValue2 != 0) {
Utils.Z0(this, str);
return;
}
this.f2635f = (List) hashMap.get(ResourceManager.GIFT);
this.f2636g = (List) hashMap.get("vip");
this.f2637h = (List) hashMap.get("props");
if (hashMap.get("money") != null && !TextUtils.isEmpty(hashMap.get("money").toString())) {
this.p = Integer.parseInt((String) hashMap.get("money"));
}
Message message = new Message();
message.what = 10;
this.w.sendMessage(message);
return;
}
if (intValue != 10057) {
return;
}
if (intValue2 != 0) {
if (intValue2 == -300 || intValue2 == -310) {
O(str);
return;
} else {
Utils.Z0(this, str);
return;
}
}
Utils.Z0(this, str);
if (this.a == x) {
this.c.f();
return;
}
if (this.u == 1) {
Intent intent = getIntent();
intent.putExtra("giftid", this.r);
intent.putExtra("giftName", this.t);
intent.putExtra("giftImage", this.s);
setResult(-1, intent);
}
finish();
}
}
public void z(GiftInfo giftInfo) {
q qVar = new q();
View inflate = View.inflate(this, R.layout.show_prop_dialog, null);
this.l.displayImage(giftInfo.getImage(), (ImageView) inflate.findViewById(R.id.iv_show_prop_pic));
((TextView) inflate.findViewById(R.id.tv_content)).setText(giftInfo.getName());
TextView textView = (TextView) inflate.findViewById(R.id.tv_show_prop_gold);
TextView textView2 = (TextView) inflate.findViewById(R.id.tv_show_prop_renewals);
textView.setVisibility(8);
textView2.setVisibility(8);
TextView textView3 = (TextView) inflate.findViewById(R.id.show_prop_descr);
int i2 = this.o;
if (i2 == 0) {
textView3.setText("价格:" + giftInfo.getMoney() + "\n美丽+" + giftInfo.getBeautyValue() + "\n蜜金+" + giftInfo.getWealthValue());
} else if (i2 == 1) {
textView3.setText("价格:" + giftInfo.getMoney() + "\n" + getString(R.string.service_time_add) + giftInfo.getDesc1());
}
textView3.setGravity(17);
Button button = (Button) inflate.findViewById(R.id.bt_buy);
button.setText("赠送");
button.setOnClickListener(new h(giftInfo, qVar));
inflate.findViewById(2131297087).setOnClickListener(new i(this, qVar));
qVar.j(this, inflate, 1.0f, 17, R.style.anim_sclae_inout_style);
}
}