中建乐购 v3.2.2版本的 MD5 值为:0553721e6bc6ba8dd67004696a555b81
以下内容为反编译后的 s.java 源代码,内容仅作参考
package fd;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Html;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.qianseit.westore.ui.CommonTextView;
import com.qianseit.westore.ui.ShareView;
import com.qianseit.westore.ui.pulltorefresh.lib.PullToRefreshBase;
import com.qianseit.westore.ui.pulltorefresh.lib.PullToRefreshListView;
import com.shopex.westore.AgentApplication;
import com.shopex.westore.activity.AgentActivity;
import com.shopex.westore.j;
import com.zjsjtz.ecstore.R;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
public class s extends com.shopex.westore.b implements ShareView.a, j.c {
private TextView A;
private TextView B;
private TextView C;
private TextView D;
private TextView E;
private TextView F;
private TextView G;
private ImageView H;
private Button I;
private LinearLayout J;
private com.shopex.westore.h K;
private LinearLayout L;
private ShareView M;
private boolean N;
private k P;
private LayoutInflater f17624f;
private PullToRefreshListView f17625g;
private TextView f17626h;
private fj.d f17629k;
private String f17630l;
private String f17631m;
private RelativeLayout f17634p;
private RelativeLayout f17635q;
private RelativeLayout f17636r;
private com.shopex.westore.j f17638t;
private JSONObject f17639u;
private LinearLayout f17640v;
private String f17641w;
private int f17642x;
private ImageView f17644z;
private int f17619a = 512;
private int f17620b = 256;
private int f17621c = 257;
private int f17622d = AgentActivity.f8584n;
private int f17623e = AgentActivity.f8585o;
private int f17627i = 0;
private boolean f17628j = true;
private boolean f17632n = true;
private boolean f17633o = true;
private boolean f17637s = true;
private ArrayList<JSONObject> f17643y = new ArrayList<>();
@SuppressLint({"HandlerLeak"})
private Handler O = new Handler() {
@Override
public void handleMessage(Message message) {
super.handleMessage(message);
if (message.what == s.this.f17620b) {
s.this.f17626h.setVisibility(4);
} else if (message.what == s.this.f17621c) {
s.this.f17626h.setVisibility(0);
if (s.this.f17632n) {
s.this.f17626h.setText("你目前还没有推荐过好物哦");
} else {
s.this.f17626h.setText("TA目前还没有推荐过好物哦");
}
} else if (message.what == s.this.f17622d) {
s.this.f17626h.setVisibility(4);
} else if (message.what == s.this.f17623e) {
s.this.f17626h.setVisibility(0);
if (s.this.f17632n) {
s.this.f17626h.setText("你目前还没有收藏过好物哦");
} else {
s.this.f17626h.setText("TA目前还没有收藏过好物哦");
}
} else if (message.what == s.this.f17619a) {
s.this.f17640v.setVisibility(0);
if (s.this.f17638t == null) {
return;
}
s.this.f17638t.notifyDataSetChanged();
s.this.f17639u = (JSONObject) message.obj;
s.this.A.setText(s.this.f17639u.optString("member_lv_id"));
s.this.f17644z.setTag(Uri.parse(s.this.f17639u.optString("avatar")));
bo.c.a(s.this.f17639u.optString("avatar"), s.this.f17644z);
s.this.B.setText("null".equals(s.this.f17639u.optString(ca.c.f4821e)) ? "未设置昵称" : s.this.f17639u.optString(ca.c.f4821e));
int optInt = s.this.f17639u.optInt("sex");
if (optInt == 0) {
s.this.H.setImageResource(R.drawable.home_nv);
} else if (optInt == 1) {
s.this.H.setImageResource(R.drawable.home_nan);
} else {
s.this.H.setVisibility(8);
}
if ("0".equals(s.this.f17639u.optString("is_attention"))) {
s.this.J.setVisibility(0);
s.this.I.setVisibility(8);
} else {
s.this.J.setVisibility(8);
s.this.I.setVisibility(0);
}
s.this.D.setText(s.this.f17639u.optString("opinions_num"));
s.this.C.setText(s.this.f17639u.optString("praise_num"));
s.this.E.setText(s.this.f17639u.optString("fans_num"));
s.this.F.setText(s.this.f17639u.optString("follow_num"));
s.this.G = (TextView) s.this.f17640v.findViewById(R.id.personal_info);
if ("null".equals(s.this.f17639u.optString("signature")) || "".equals(s.this.f17639u.optString("signature"))) {
return;
}
s.this.G.setText(s.this.f17639u.optString("signature"));
}
}
};
private View.OnClickListener Q = new View.OnClickListener() {
@Override
public void onClick(View view) {
s.this.f17634p.setSelected(false);
s.this.f17634p.getChildAt(1).setVisibility(8);
if (view != s.this.f17635q) {
if (view == s.this.f17636r) {
s.this.f17634p = s.this.f17636r;
s.this.f17637s = false;
}
} else {
s.this.f17634p = s.this.f17635q;
s.this.f17637s = true;
}
s.this.f17634p.setSelected(true);
s.this.f17634p.getChildAt(1).setVisibility(0);
s.this.a(0, true);
}
};
@Override
public String a() {
return "我是你的他";
}
@Override
public String c() {
return "http://www.zhuoku.com/zhuomianbizhi/jing-car/20110221185337(9).htm";
}
@Override
public String d() {
return "http://www.zhuoku.com/zhuomianbizhi/jing-car/20110221185337(9).htm";
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.mActionBar.setTitle(R.string.account_person_title);
WindowManager windowManager = (WindowManager) this.mActivity.getSystemService("window");
windowManager.getDefaultDisplay().getMetrics(new DisplayMetrics());
this.f17642x = windowManager.getDefaultDisplay().getWidth() - com.shopex.westore.util.ai.a((Context) this.mActivity, 10.0f);
this.K = AgentApplication.c(this.mActivity);
this.f17641w = this.K.K();
Intent intent = this.mActivity.getIntent();
this.f17637s = intent.getBooleanExtra("com.shopex.westore.EXTRA_DATA", true);
this.f17630l = intent.getStringExtra("userId");
this.f17631m = intent.getStringExtra("fans_id");
this.N = intent.getBooleanExtra("isfans", false);
if (TextUtils.isEmpty(this.f17630l)) {
return;
}
this.f17632n = TextUtils.equals(this.f17630l, this.K.K());
}
@Override
public void init(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
this.f17624f = layoutInflater;
this.rootView = layoutInflater.inflate(R.layout.fragment_account_personal_main, (ViewGroup) null);
this.M = (ShareView) findViewById(R.id.share_view);
this.f17626h = (TextView) findViewById(R.id.personal_listview_null);
this.f17625g = (PullToRefreshListView) findViewById(R.id.personal_listview);
this.f17635q = (RelativeLayout) findViewById(R.id.personal_collect_rel);
this.f17635q.setOnClickListener(this.Q);
this.f17636r = (RelativeLayout) findViewById(R.id.personal_recommend_rel);
this.C = (TextView) findViewById(R.id.personal_liked);
this.E = (TextView) findViewById(R.id.personal_fans);
this.F = (TextView) findViewById(R.id.personal_attention);
this.D = (TextView) findViewById(R.id.personal_recommend);
this.f17644z = (ImageView) findViewById(R.id.account_personal_avatar);
this.A = (TextView) findViewById(R.id.account_personal_lv);
this.A.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent putExtra = AgentActivity.a(s.this.getActivity(), (int) AgentActivity.U).putExtra(cv.c.J, "商派等级规则");
if (s.this.f17632n) {
putExtra.putExtra(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, com.shopex.westore.k.a(com.shopex.westore.k.f10179b, "/wap/statics-pointLv.html?from=app&member_id=", s.this.K.K()));
} else {
putExtra.putExtra(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, com.shopex.westore.k.a(com.shopex.westore.k.f10179b, "/wap/statics-pointLv.html?from=app"));
}
s.this.getActivity().startActivity(putExtra);
}
});
this.B = (TextView) findViewById(R.id.account_personal_name);
this.H = (ImageView) findViewById(R.id.account_personal_sex);
findViewById(R.id.account_personal_fans_linear).setOnClickListener(this);
findViewById(R.id.account_personal_attention_linear).setOnClickListener(this);
this.I = (Button) findViewById(R.id.account_click_but);
this.I.setOnClickListener(this);
this.J = (LinearLayout) findViewById(R.id.account_attention_linear);
this.J.setOnClickListener(this);
this.L = (LinearLayout) findViewById(R.id.account_personal_attention);
this.L.setOnClickListener(this);
if (this.f17637s) {
this.f17634p = this.f17635q;
} else {
this.f17634p = this.f17636r;
}
this.f17634p.setSelected(true);
this.f17634p.getChildAt(1).setVisibility(0);
this.f17636r.setOnClickListener(this.Q);
this.f17640v = (LinearLayout) findViewById(R.id.personal_top);
if (this.K.K().equals(this.f17630l)) {
findViewById(R.id.account_personal_like_linear).setOnClickListener(this);
this.L.setVisibility(8);
}
com.shopex.westore.k.a((View) this.f17640v);
com.shopex.westore.k.a((View) this.f17626h);
this.f17626h.setLayoutParams(new AbsListView.LayoutParams(this.f17626h.getLayoutParams()));
this.f17640v.setLayoutParams(new AbsListView.LayoutParams(this.f17640v.getLayoutParams()));
((ListView) this.f17625g.getRefreshableView()).addHeaderView(this.f17640v);
((ListView) this.f17625g.getRefreshableView()).addFooterView(this.f17626h);
((ListView) this.f17625g.getRefreshableView()).setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i2, long j2) {
}
});
this.f17628j = true;
a(0, false);
this.f17625g.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView absListView, int i2) {
}
@Override
public void onScroll(AbsListView absListView, int i2, int i3, int i4) {
if (i4 >= 5 && i4 - (i2 + i3) <= 5) {
s.this.a(s.this.f17627i, false);
}
}
});
this.f17625g.setOnRefreshListener(new PullToRefreshBase.b() {
@Override
public void onRefreshMore() {
}
@Override
public void onRefresh() {
s.this.f17628j = true;
s.this.a(0, false);
}
});
this.f17640v.setVisibility(4);
this.f17626h.setVisibility(4);
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onPause() {
super.onPause();
}
public void a(int i2, boolean z2) {
this.f17627i = i2 + 1;
if (this.f17627i == 1) {
this.f17643y.clear();
this.f17626h.setVisibility(4);
if (!z2) {
this.f17625g.g();
}
if (this.f17628j) {
if (this.f17632n) {
this.f17638t = new com.shopex.westore.j(this, this.mActivity, this.f17643y, this.f17632n);
((ListView) this.f17625g.getRefreshableView()).setAdapter((ListAdapter) this.f17638t);
this.f17638t.a(this);
com.shopex.westore.k.a(new fj.d(), new j());
} else if (this.N) {
com.shopex.westore.k.a(new fj.d(), new g());
} else {
com.shopex.westore.k.a(new fj.d(), new h());
}
this.f17628j = false;
}
this.f17633o = true;
} else {
this.f17633o = false;
if (this.f17629k != null && this.f17629k.getStatus() == AsyncTask.Status.RUNNING) {
return;
}
}
this.f17629k = new fj.d();
if (this.f17637s) {
if (this.f17633o) {
this.f17638t = new com.shopex.westore.j(this, this.mActivity, this.f17643y, this.f17632n);
((ListView) this.f17625g.getRefreshableView()).setAdapter((ListAdapter) this.f17638t);
this.f17638t.a(this);
}
com.shopex.westore.k.a(this.f17629k, new f(this.f17630l, z2));
return;
}
if (this.f17633o) {
this.P = new k();
((ListView) this.f17625g.getRefreshableView()).setAdapter((ListAdapter) this.P);
}
com.shopex.westore.k.a(this.f17629k, new i(this.f17630l, z2));
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.account_click_but:
showCancelableLoadingDialog();
com.shopex.westore.k.a(new fj.d(), new c(this.f17630l, this.K.K()));
return;
case R.id.account_attention_linear:
showCancelableLoadingDialog();
com.shopex.westore.k.a(new fj.d(), new a(this.f17630l, this.K.K()));
return;
case R.id.account_personal_recommend_linear:
case R.id.personal_recommend:
case R.id.personal_liked:
case R.id.personal_attention:
default:
return;
case R.id.account_personal_like_linear:
startActivity(AgentActivity.a(this.mActivity, (int) AgentActivity.aE).putExtra("com.shopex.westore.EXTRA_DATA", false));
return;
case R.id.account_personal_attention_linear:
startActivity(AgentActivity.a(this.mActivity, (int) AgentActivity.aA).putExtra("userId", this.f17630l));
return;
case R.id.account_personal_fans_linear:
startActivity(AgentActivity.a(this.mActivity, (int) AgentActivity.aC).putExtra("userId", this.f17630l));
return;
}
}
private int a(View view) {
view.measure(-2, -2);
return view.getMeasuredWidth();
}
private int b(View view) {
view.measure(-2, -2);
return view.getMeasuredHeight();
}
@Override
public void a(String str) {
Iterator<JSONObject> it = this.f17643y.iterator();
while (it.hasNext()) {
if (it.next().optString("goods_id").equals(str)) {
it.remove();
}
}
this.f17638t.notifyDataSetChanged();
}
public class k extends BaseAdapter {
@Override
public long getItemId(int i2) {
return i2;
}
private k() {
}
@Override
public int getCount() {
return s.this.f17643y.size();
}
@Override
public JSONObject getItem(int i2) {
return (JSONObject) s.this.f17643y.get(i2);
}
@Override
public View getView(int i2, View view, ViewGroup viewGroup) {
ImageView imageView;
ImageView imageView2;
CommonTextView commonTextView;
CommonTextView commonTextView2;
CommonTextView commonTextView3;
CommonTextView commonTextView4;
CommonTextView commonTextView5;
CommonTextView commonTextView6;
CommonTextView commonTextView7;
CommonTextView commonTextView8;
ImageView imageView3;
View view2;
CommonTextView commonTextView9;
CommonTextView commonTextView10;
CommonTextView commonTextView11;
final ImageView imageView4;
if (view == null) {
view2 = s.this.f17624f.inflate(R.layout.item_new_listview, (ViewGroup) null);
imageView = (ImageView) view2.findViewById(R.id.imgfilter);
ImageView imageView5 = (ImageView) view2.findViewById(R.id.img_brand_logos);
CommonTextView commonTextView12 = (CommonTextView) view2.findViewById(R.id.textview_names);
CommonTextView commonTextView13 = (CommonTextView) view2.findViewById(R.id.textview_levels);
CommonTextView commonTextView14 = (CommonTextView) view2.findViewById(R.id.button_relateds);
CommonTextView commonTextView15 = (CommonTextView) view2.findViewById(R.id.textview_titles);
CommonTextView commonTextView16 = (CommonTextView) view2.findViewById(R.id.textview_contents);
CommonTextView commonTextView17 = (CommonTextView) view2.findViewById(R.id.textview_times);
CommonTextView commonTextView18 = (CommonTextView) view2.findViewById(R.id.textview_commentss);
CommonTextView commonTextView19 = (CommonTextView) view2.findViewById(R.id.textview_likes);
ImageView imageView6 = (ImageView) view2.findViewById(R.id.textview_likes_image);
commonTextView5 = commonTextView17;
view2.setTag(new l(imageView5, commonTextView19, commonTextView18, commonTextView5, commonTextView16, commonTextView15, imageView, commonTextView14, commonTextView12, commonTextView13, imageView6));
imageView2 = imageView5;
commonTextView8 = commonTextView12;
commonTextView = commonTextView13;
commonTextView2 = commonTextView14;
commonTextView3 = commonTextView15;
commonTextView4 = commonTextView16;
commonTextView6 = commonTextView18;
commonTextView7 = commonTextView19;
imageView3 = imageView6;
} else {
l lVar = (l) view.getTag();
imageView = lVar.f17695h;
imageView2 = lVar.f17688a;
commonTextView = lVar.f17698k;
commonTextView2 = lVar.f17696i;
commonTextView3 = lVar.f17694g;
commonTextView4 = lVar.f17693f;
commonTextView5 = lVar.f17692e;
commonTextView6 = lVar.f17691d;
commonTextView7 = lVar.f17690c;
commonTextView8 = lVar.f17697j;
imageView3 = lVar.f17699l;
view2 = view;
}
final JSONObject item = getItem(i2);
imageView3.setTag(item);
final CommonTextView commonTextView20 = (CommonTextView) view2.findViewById(R.id.textview_shareads);
RelativeLayout relativeLayout = (RelativeLayout) view2.findViewById(R.id.ll_position);
View view3 = view2;
bo.c.a(item.optString("avatar"), imageView2);
bo.c.a(item.optString(cv.c.f13814ae), imageView);
commonTextView8.setText(item.optString(ca.c.f4821e));
commonTextView4.setText(item.optString("content"));
commonTextView3.setText(item.optString("goods_name"));
JSONObject optJSONObject = item.optJSONObject("tag");
ImageView imageView7 = imageView3;
CommonTextView commonTextView21 = commonTextView;
final CommonTextView commonTextView22 = commonTextView7;
if (relativeLayout.getChildCount() >= 2) {
relativeLayout.removeViewAt(1);
}
if (optJSONObject != null) {
Iterator<String> keys = optJSONObject.keys();
ArrayList arrayList = new ArrayList();
while (keys.hasNext()) {
arrayList.add(keys.next().toString());
}
if (arrayList.size() > 0) {
JSONObject optJSONObject2 = optJSONObject.optJSONObject((String) arrayList.get(0));
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
commonTextView11 = commonTextView6;
int floatValue = (int) (s.this.f17642x * ((float) (Float.valueOf(optJSONObject2.optString("x")).floatValue() / 100.0d)));
commonTextView9 = commonTextView2;
layoutParams.topMargin = (int) (com.shopex.westore.util.ai.a((Context) s.this.mActivity, 320.0f) * ((float) (Float.valueOf(optJSONObject2.optString("y")).floatValue() / 100.0d)));
layoutParams.leftMargin = floatValue;
View inflate = s.this.f17624f.inflate(R.layout.picturetagview, (ViewGroup) null, true);
TextView textView = (TextView) inflate.findViewById(R.id.tvPictureTagLabel);
RelativeLayout relativeLayout2 = (RelativeLayout) inflate.findViewById(R.id.loTag);
commonTextView10 = commonTextView5;
if (optJSONObject2.optString("image_type").equals("1")) {
relativeLayout2.setBackgroundResource(R.drawable.bg_picturetagview_tagview_right);
} else {
relativeLayout2.setBackgroundResource(R.drawable.bg_picturetagview_tagview_left);
}
relativeLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.getActivity(), (int) AgentActivity.f8577g).putExtra(com.shopex.westore.k.f10186i, item.optString("goods_id")));
}
});
textView.setText(optJSONObject2.optString("image_tag"));
relativeLayout.addView(inflate, layoutParams);
commonTextView20.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
com.qianseit.westore.ui.l lVar2 = new com.qianseit.westore.ui.l(s.this.mActivity);
lVar2.a(new ShareView.a() {
@Override
public String d() {
return item.optString("share_url");
}
@Override
public String a() {
return item.optString("goods_name") + "-" + item.optString("content");
}
@Override
public String c() {
return item.optString(cv.c.f13814ae);
}
@Override
public String b() {
return com.shopex.westore.util.b.b(item.optString(cv.c.f13814ae));
}
});
lVar2.a(commonTextView20);
}
});
bo.c.a(item.optString("avatar"), imageView2);
bo.c.a(item.optString(cv.c.f13814ae), imageView);
commonTextView8.setText(item.optString(ca.c.f4821e));
commonTextView4.setText(item.optString("content"));
commonTextView3.setText(item.optString("goods_name"));
commonTextView4.setText(Html.fromHtml("<font size=\"4\" color=\"red\">[好物推荐]</font><font size=\"4\" color=\"#9b9b9b\"></font>" + item.optString("content")));
commonTextView10.setText(e.d(item.optString("created")));
CommonTextView commonTextView23 = commonTextView9;
commonTextView23.setBackgroundColor(Color.parseColor("#ffffff"));
commonTextView23.setTextColor(Color.parseColor("#666666"));
commonTextView23.setText(e.c(item.optString("created")));
CommonTextView commonTextView24 = commonTextView11;
commonTextView24.setText("评论(" + item.optString("c_num") + ")");
commonTextView22.setText(item.optString("p_num"));
commonTextView21.setText(item.optString("member_lv_id"));
if (!item.optString("is_praise").equals("0")) {
imageView4 = imageView7;
imageView4.setImageResource(R.drawable.my_msg_praise);
} else {
imageView4 = imageView7;
imageView4.setImageResource(R.drawable.my_new_fans);
}
imageView4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
if (item.optString("is_praise").equals("0")) {
com.shopex.westore.k.a(new fj.d(), new b(s.this.f17641w, item.optString("id")));
imageView4.setImageResource(R.drawable.my_new_fans);
int intValue = Integer.valueOf(commonTextView22.getText().toString()).intValue() + 1;
CommonTextView commonTextView25 = commonTextView22;
commonTextView25.setText(intValue + "");
item.remove("is_praise");
try {
item.put("is_praise", 1);
item.remove("p_num");
JSONObject jSONObject = item;
jSONObject.put("p_num", intValue + "");
return;
} catch (JSONException e2) {
e2.printStackTrace();
return;
}
}
com.shopex.westore.k.a(new fj.d(), new d(s.this.f17641w, item.optString("id")));
imageView4.setImageResource(R.drawable.my_msg_praise);
int intValue2 = Integer.valueOf(commonTextView22.getText().toString()).intValue() - 1;
CommonTextView commonTextView26 = commonTextView22;
commonTextView26.setText(intValue2 + "");
CommonTextView commonTextView27 = commonTextView22;
commonTextView27.setText(intValue2 + "");
item.remove("is_praise");
try {
item.put("is_praise", 0);
item.remove("p_num");
JSONObject jSONObject2 = item;
jSONObject2.put("p_num", intValue2 + "");
Toast.makeText(s.this.mActivity, "取消点赞", 5000).show();
} catch (JSONException e3) {
e3.printStackTrace();
}
}
});
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.mActivity, 144).putExtra("id", item.optString("id")).putExtra("com.shopex.westore.EXTRA_DATA", true));
}
});
commonTextView24.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.mActivity, 144).putExtra("id", item.optString("id")).putExtra("com.shopex.westore.EXTRA_DATA", true));
}
});
imageView2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.mActivity, (int) AgentActivity.f8519ay).putExtra("userId", s.this.f17630l));
}
});
return view3;
}
}
commonTextView9 = commonTextView2;
commonTextView10 = commonTextView5;
commonTextView11 = commonTextView6;
commonTextView20.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
com.qianseit.westore.ui.l lVar2 = new com.qianseit.westore.ui.l(s.this.mActivity);
lVar2.a(new ShareView.a() {
@Override
public String d() {
return item.optString("share_url");
}
@Override
public String a() {
return item.optString("goods_name") + "-" + item.optString("content");
}
@Override
public String c() {
return item.optString(cv.c.f13814ae);
}
@Override
public String b() {
return com.shopex.westore.util.b.b(item.optString(cv.c.f13814ae));
}
});
lVar2.a(commonTextView20);
}
});
bo.c.a(item.optString("avatar"), imageView2);
bo.c.a(item.optString(cv.c.f13814ae), imageView);
commonTextView8.setText(item.optString(ca.c.f4821e));
commonTextView4.setText(item.optString("content"));
commonTextView3.setText(item.optString("goods_name"));
commonTextView4.setText(Html.fromHtml("<font size=\"4\" color=\"red\">[好物推荐]</font><font size=\"4\" color=\"#9b9b9b\"></font>" + item.optString("content")));
commonTextView10.setText(e.d(item.optString("created")));
CommonTextView commonTextView232 = commonTextView9;
commonTextView232.setBackgroundColor(Color.parseColor("#ffffff"));
commonTextView232.setTextColor(Color.parseColor("#666666"));
commonTextView232.setText(e.c(item.optString("created")));
CommonTextView commonTextView242 = commonTextView11;
commonTextView242.setText("评论(" + item.optString("c_num") + ")");
commonTextView22.setText(item.optString("p_num"));
commonTextView21.setText(item.optString("member_lv_id"));
if (!item.optString("is_praise").equals("0")) {
}
imageView4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
if (item.optString("is_praise").equals("0")) {
com.shopex.westore.k.a(new fj.d(), new b(s.this.f17641w, item.optString("id")));
imageView4.setImageResource(R.drawable.my_new_fans);
int intValue = Integer.valueOf(commonTextView22.getText().toString()).intValue() + 1;
CommonTextView commonTextView25 = commonTextView22;
commonTextView25.setText(intValue + "");
item.remove("is_praise");
try {
item.put("is_praise", 1);
item.remove("p_num");
JSONObject jSONObject = item;
jSONObject.put("p_num", intValue + "");
return;
} catch (JSONException e2) {
e2.printStackTrace();
return;
}
}
com.shopex.westore.k.a(new fj.d(), new d(s.this.f17641w, item.optString("id")));
imageView4.setImageResource(R.drawable.my_msg_praise);
int intValue2 = Integer.valueOf(commonTextView22.getText().toString()).intValue() - 1;
CommonTextView commonTextView26 = commonTextView22;
commonTextView26.setText(intValue2 + "");
CommonTextView commonTextView27 = commonTextView22;
commonTextView27.setText(intValue2 + "");
item.remove("is_praise");
try {
item.put("is_praise", 0);
item.remove("p_num");
JSONObject jSONObject2 = item;
jSONObject2.put("p_num", intValue2 + "");
Toast.makeText(s.this.mActivity, "取消点赞", 5000).show();
} catch (JSONException e3) {
e3.printStackTrace();
}
}
});
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.mActivity, 144).putExtra("id", item.optString("id")).putExtra("com.shopex.westore.EXTRA_DATA", true));
}
});
commonTextView242.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.mActivity, 144).putExtra("id", item.optString("id")).putExtra("com.shopex.westore.EXTRA_DATA", true));
}
});
imageView2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view4) {
s.this.startActivity(AgentActivity.a(s.this.mActivity, (int) AgentActivity.f8519ay).putExtra("userId", s.this.f17630l));
}
});
return view3;
}
}
private class m {
private ImageView f17702b;
private TextView f17703c;
private TextView f17704d;
private TextView f17705e;
private ImageView f17706f;
private m() {
}
}
public class i implements fj.e {
private boolean f17669b;
private String f17670c;
public i(String str, boolean z2) {
this.f17669b = z2;
this.f17670c = str;
}
@Override
public void task_response(String str) {
try {
s.this.hideLoadingDialog_mt();
s.this.f17625g.f();
JSONObject jSONObject = new JSONObject(str);
if (com.shopex.westore.k.a((Context) s.this.mActivity, jSONObject)) {
JSONArray optJSONArray = jSONObject.optJSONArray("data");
if (optJSONArray != null && optJSONArray.length() > 0) {
for (int i2 = 0; i2 < optJSONArray.length(); i2++) {
s.this.f17643y.add(optJSONArray.optJSONObject(i2));
}
}
s.this.P.notifyDataSetChanged();
}
if (s.this.f17643y.size() <= 0) {
s.this.O.sendEmptyMessage(s.this.f17621c);
} else {
s.this.O.sendEmptyMessage(s.this.f17622d);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public fj.c task_request() {
if (this.f17669b) {
s.this.showCancelableLoadingDialog();
}
fj.c cVar = new fj.c("mobileapi.goods.getopinionsformember");
cVar.a("page", String.valueOf(s.this.f17627i));
cVar.a("member_id", this.f17670c);
return cVar;
}
}
public class g implements fj.e {
g() {
}
@Override
public void task_response(String str) {
JSONObject optJSONObject;
try {
s.this.f17625g.f();
JSONObject jSONObject = new JSONObject(str);
if (!com.shopex.westore.k.a((Context) s.this.mActivity, jSONObject) || (optJSONObject = jSONObject.optJSONObject("data")) == null) {
return;
}
Message message = new Message();
message.what = s.this.f17619a;
message.obj = optJSONObject;
s.this.O.sendMessage(message);
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public fj.c task_request() {
fj.c cVar = new fj.c("mobileapi.goods.get_fans_info");
cVar.a("member_id", s.this.f17630l);
cVar.a("fans_id", s.this.f17631m);
return cVar;
}
}
public class h implements fj.e {
h() {
}
@Override
public void task_response(String str) {
JSONObject optJSONObject;
try {
s.this.f17625g.f();
JSONObject jSONObject = new JSONObject(str);
if (!com.shopex.westore.k.a((Context) s.this.mActivity, jSONObject) || (optJSONObject = jSONObject.optJSONObject("data")) == null) {
return;
}
Message message = new Message();
message.what = s.this.f17619a;
message.obj = optJSONObject;
s.this.O.sendMessage(message);
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public fj.c task_request() {
fj.c cVar = new fj.c("mobileapi.goods.get_attention_info");
cVar.a("member_id", s.this.f17630l);
cVar.a("fans_id", s.this.f17631m);
return cVar;
}
}
public class j implements fj.e {
j() {
}
@Override
public void task_response(String str) {
JSONObject optJSONObject;
try {
s.this.f17625g.f();
JSONObject jSONObject = new JSONObject(str);
if (!com.shopex.westore.k.a((Context) s.this.mActivity, jSONObject) || (optJSONObject = jSONObject.optJSONObject("data")) == null) {
return;
}
Message message = new Message();
message.what = s.this.f17619a;
message.obj = optJSONObject;
s.this.O.sendMessage(message);
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public fj.c task_request() {
fj.c cVar = new fj.c("mobileapi.goods.get_member_info");
cVar.a("son_object", "json");
return cVar;
}
}
private class c implements fj.e {
private String f17658b;
private String f17659c;
public c(String str, String str2) {
this.f17658b = str;
this.f17659c = str2;
}
@Override
public fj.c task_request() {
s.this.showCancelableLoadingDialog();
fj.c cVar = new fj.c("mobileapi.member.un_attention");
cVar.a("member_id", this.f17658b);
cVar.a("fans_id", this.f17659c);
return cVar;
}
@Override
public void task_response(String str) {
s.this.hideLoadingDialog();
try {
if (com.shopex.westore.k.a((Context) s.this.mActivity, new JSONObject(str))) {
com.shopex.westore.k.a(new fj.d(), new h());
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
private class a implements fj.e {
private String f17652b;
private String f17653c;
public a(String str, String str2) {
this.f17652b = str;
this.f17653c = str2;
}
@Override
public fj.c task_request() {
s.this.showCancelableLoadingDialog();
fj.c cVar = new fj.c("mobileapi.member.attention");
cVar.a("member_id", this.f17652b);
cVar.a("fans_id", this.f17653c);
return cVar;
}
@Override
public void task_response(String str) {
s.this.hideLoadingDialog();
try {
if (com.shopex.westore.k.a((Context) s.this.mActivity, new JSONObject(str))) {
com.shopex.westore.k.a(new fj.d(), new h());
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
public class f implements fj.e {
private String f17664b;
private boolean f17665c;
public f(String str, boolean z2) {
this.f17664b = str;
this.f17665c = z2;
}
@Override
public fj.c task_request() {
if (this.f17665c) {
s.this.showCancelableLoadingDialog();
}
fj.c cVar = new fj.c("mobileapi.info.favorite");
cVar.a("member_id", this.f17664b);
cVar.a("n_page", String.valueOf(s.this.f17627i));
return cVar;
}
@Override
public void task_response(String str) {
JSONArray optJSONArray;
try {
s.this.hideLoadingDialog_mt();
JSONObject jSONObject = new JSONObject(str);
s.this.f17625g.f();
if (com.shopex.westore.k.a((Context) s.this.mActivity, jSONObject) && (optJSONArray = jSONObject.optJSONArray("data")) != null && optJSONArray.length() > 0) {
for (int i2 = 0; i2 < optJSONArray.length(); i2++) {
s.this.f17643y.add(optJSONArray.optJSONObject(i2));
}
s.this.f17638t.notifyDataSetChanged();
}
if (s.this.f17643y.size() <= 0) {
s.this.O.sendEmptyMessage(s.this.f17623e);
} else {
s.this.O.sendEmptyMessage(s.this.f17622d);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
@Override
public String b() {
String c2 = c();
if (TextUtils.isEmpty(c2)) {
return null;
}
return com.shopex.westore.util.b.b(c2);
}
public class l {
ImageView f17688a;
CommonTextView f17690c;
CommonTextView f17691d;
CommonTextView f17692e;
CommonTextView f17693f;
CommonTextView f17694g;
ImageView f17695h;
CommonTextView f17696i;
CommonTextView f17697j;
CommonTextView f17698k;
ImageView f17699l;
CommonTextView f17689b = this.f17689b;
CommonTextView f17689b = this.f17689b;
public l(ImageView imageView, CommonTextView commonTextView, CommonTextView commonTextView2, CommonTextView commonTextView3, CommonTextView commonTextView4, CommonTextView commonTextView5, ImageView imageView2, CommonTextView commonTextView6, CommonTextView commonTextView7, CommonTextView commonTextView8, ImageView imageView3) {
this.f17688a = imageView;
this.f17690c = commonTextView;
this.f17691d = commonTextView2;
this.f17692e = commonTextView3;
this.f17693f = commonTextView4;
this.f17694g = commonTextView5;
this.f17695h = imageView2;
this.f17696i = commonTextView6;
this.f17697j = commonTextView7;
this.f17698k = commonTextView8;
this.f17699l = imageView3;
}
}
public static class e {
public static String a(Date date) {
return new SimpleDateFormat("yyyy-MM-dd").format(date);
}
public static String b(Date date) {
return new SimpleDateFormat("yyyy/M/d hh:mm").format(date);
}
public static Date a(String str) {
try {
return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse(str);
} catch (ParseException e2) {
e2.printStackTrace();
return null;
}
}
public static Date b(String str) {
try {
return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse(str);
} catch (ParseException e2) {
e2.printStackTrace();
return null;
}
}
public static String c(String str) {
Date a2 = a(str);
return a2 != null ? a(a2) : "";
}
public static String d(String str) {
Date b2 = b(str);
return b2 != null ? b(b2) : "";
}
}
class b implements fj.e {
private String f17655b;
private String f17656c;
public b(String str, String str2) {
this.f17655b = str;
this.f17656c = str2;
}
@Override
public fj.c task_request() {
s.this.showCancelableLoadingDialog();
fj.c cVar = new fj.c("mobileapi.goods.add_opinions_praise");
cVar.a("member_id", this.f17655b);
cVar.a("opinions_id", this.f17656c);
return cVar;
}
@Override
public void task_response(String str) {
s.this.hideLoadingDialog();
try {
if (com.shopex.westore.k.a((Context) s.this.mActivity, new JSONObject(str))) {
Toast.makeText(s.this.mActivity, "点赞成功", 5000).show();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
class d implements fj.e {
private String f17661b;
private String f17662c;
public d(String str, String str2) {
this.f17661b = str;
this.f17662c = str2;
}
@Override
public fj.c task_request() {
s.this.showCancelableLoadingDialog();
fj.c cVar = new fj.c("mobileapi.goods.del_opinions_praise");
cVar.a("opinions_id", this.f17662c);
return cVar;
}
@Override
public void task_response(String str) {
s.this.hideLoadingDialog();
try {
if (com.shopex.westore.k.a((Context) s.this.mActivity, new JSONObject(str))) {
Toast.makeText(s.this.mActivity, "已取消点赞", 5000).show();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
@Override
public boolean onKeyDown(int i2, KeyEvent keyEvent) {
if (i2 == 4) {
if (this.M.getVisibility() == 0) {
this.M.b();
return true;
}
return super.onKeyDown(i2, keyEvent);
}
return super.onKeyDown(i2, keyEvent);
}
}