中建乐购 v3.2.3版本的 MD5 值为:3856d0da11f056931d64951d23a4b3b8

以下内容为反编译后的 s.java 源代码,内容仅作参考


package fo;

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 f17847f;
    private PullToRefreshListView f17848g;
    private TextView f17849h;
    private fu.d f17852k;
    private String f17853l;
    private String f17854m;
    private RelativeLayout f17857p;
    private RelativeLayout f17858q;
    private RelativeLayout f17859r;
    private com.shopex.westore.j f17861t;
    private JSONObject f17862u;
    private LinearLayout f17863v;
    private String f17864w;
    private int f17865x;
    private ImageView f17867z;
    private int f17842a = 512;
    private int f17843b = 256;
    private int f17844c = 257;
    private int f17845d = AgentActivity.f8630n;
    private int f17846e = AgentActivity.f8631o;
    private int f17850i = 0;
    private boolean f17851j = true;
    private boolean f17855n = true;
    private boolean f17856o = true;
    private boolean f17860s = true;
    private ArrayList<JSONObject> f17866y = new ArrayList<>();
    @SuppressLint({"HandlerLeak"})
    private Handler O = new Handler() {
        @Override
        public void handleMessage(Message message) {
            super.handleMessage(message);
            if (message.what == s.this.f17843b) {
                s.this.f17849h.setVisibility(4);
            } else if (message.what == s.this.f17844c) {
                s.this.f17849h.setVisibility(0);
                if (s.this.f17855n) {
                    s.this.f17849h.setText("你目前还没有推荐过好物哦");
                } else {
                    s.this.f17849h.setText("TA目前还没有推荐过好物哦");
                }
            } else if (message.what == s.this.f17845d) {
                s.this.f17849h.setVisibility(4);
            } else if (message.what == s.this.f17846e) {
                s.this.f17849h.setVisibility(0);
                if (s.this.f17855n) {
                    s.this.f17849h.setText("你目前还没有收藏过好物哦");
                } else {
                    s.this.f17849h.setText("TA目前还没有收藏过好物哦");
                }
            } else if (message.what == s.this.f17842a) {
                s.this.f17863v.setVisibility(0);
                if (s.this.f17861t == null) {
                    return;
                }
                s.this.f17861t.notifyDataSetChanged();
                s.this.f17862u = (JSONObject) message.obj;
                s.this.A.setText(s.this.f17862u.optString("member_lv_id"));
                s.this.f17867z.setTag(Uri.parse(s.this.f17862u.optString("avatar")));
                bo.c.a(s.this.f17862u.optString("avatar"), s.this.f17867z);
                s.this.B.setText("null".equals(s.this.f17862u.optString(ca.c.f4824e)) ? "未设置昵称" : s.this.f17862u.optString(ca.c.f4824e));
                int optInt = s.this.f17862u.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.f17862u.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.f17862u.optString("opinions_num"));
                s.this.C.setText(s.this.f17862u.optString("praise_num"));
                s.this.E.setText(s.this.f17862u.optString("fans_num"));
                s.this.F.setText(s.this.f17862u.optString("follow_num"));
                s.this.G = (TextView) s.this.f17863v.findViewById(R.id.personal_info);
                if ("null".equals(s.this.f17862u.optString("signature")) || "".equals(s.this.f17862u.optString("signature"))) {
                    return;
                }
                s.this.G.setText(s.this.f17862u.optString("signature"));
            }
        }
    };
    private View.OnClickListener Q = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            s.this.f17857p.setSelected(false);
            s.this.f17857p.getChildAt(1).setVisibility(8);
            if (view != s.this.f17858q) {
                if (view == s.this.f17859r) {
                    s.this.f17857p = s.this.f17859r;
                    s.this.f17860s = false;
                }
            } else {
                s.this.f17857p = s.this.f17858q;
                s.this.f17860s = true;
            }
            s.this.f17857p.setSelected(true);
            s.this.f17857p.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.f17865x = windowManager.getDefaultDisplay().getWidth() - com.shopex.westore.util.ai.a((Context) this.mActivity, 10.0f);
        this.K = AgentApplication.c(this.mActivity);
        this.f17864w = this.K.K();
        Intent intent = this.mActivity.getIntent();
        this.f17860s = intent.getBooleanExtra("com.shopex.westore.EXTRA_DATA", true);
        this.f17853l = intent.getStringExtra("userId");
        this.f17854m = intent.getStringExtra("fans_id");
        this.N = intent.getBooleanExtra("isfans", false);
        if (TextUtils.isEmpty(this.f17853l)) {
            return;
        }
        this.f17855n = TextUtils.equals(this.f17853l, this.K.K());
    }

    @Override
    public void init(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.f17847f = layoutInflater;
        this.rootView = layoutInflater.inflate(R.layout.fragment_account_personal_main, (ViewGroup) null);
        this.M = (ShareView) findViewById(R.id.share_view);
        this.f17849h = (TextView) findViewById(R.id.personal_listview_null);
        this.f17848g = (PullToRefreshListView) findViewById(R.id.personal_listview);
        this.f17858q = (RelativeLayout) findViewById(R.id.personal_collect_rel);
        this.f17858q.setOnClickListener(this.Q);
        this.f17859r = (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.f17867z = (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(dc.c.J, "商派等级规则");
                if (s.this.f17855n) {
                    putExtra.putExtra(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, com.shopex.westore.k.a(com.shopex.westore.k.f10230b, "/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.f10230b, "/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.f17860s) {
            this.f17857p = this.f17858q;
        } else {
            this.f17857p = this.f17859r;
        }
        this.f17857p.setSelected(true);
        this.f17857p.getChildAt(1).setVisibility(0);
        this.f17859r.setOnClickListener(this.Q);
        this.f17863v = (LinearLayout) findViewById(R.id.personal_top);
        if (this.K.K().equals(this.f17853l)) {
            findViewById(R.id.account_personal_like_linear).setOnClickListener(this);
            this.L.setVisibility(8);
        }
        com.shopex.westore.k.a((View) this.f17863v);
        com.shopex.westore.k.a((View) this.f17849h);
        this.f17849h.setLayoutParams(new AbsListView.LayoutParams(this.f17849h.getLayoutParams()));
        this.f17863v.setLayoutParams(new AbsListView.LayoutParams(this.f17863v.getLayoutParams()));
        ((ListView) this.f17848g.getRefreshableView()).addHeaderView(this.f17863v);
        ((ListView) this.f17848g.getRefreshableView()).addFooterView(this.f17849h);
        ((ListView) this.f17848g.getRefreshableView()).setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i2, long j2) {
            }
        });
        this.f17851j = true;
        a(0, false);
        this.f17848g.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.f17850i, false);
                }
            }
        });
        this.f17848g.setOnRefreshListener(new PullToRefreshBase.b() {
            @Override
            public void onRefreshMore() {
            }

            @Override
            public void onRefresh() {
                s.this.f17851j = true;
                s.this.a(0, false);
            }
        });
        this.f17863v.setVisibility(4);
        this.f17849h.setVisibility(4);
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
    }

    public void a(int i2, boolean z2) {
        this.f17850i = i2 + 1;
        if (this.f17850i == 1) {
            this.f17866y.clear();
            this.f17849h.setVisibility(4);
            if (!z2) {
                this.f17848g.g();
            }
            if (this.f17851j) {
                if (this.f17855n) {
                    this.f17861t = new com.shopex.westore.j(this, this.mActivity, this.f17866y, this.f17855n);
                    ((ListView) this.f17848g.getRefreshableView()).setAdapter((ListAdapter) this.f17861t);
                    this.f17861t.a(this);
                    com.shopex.westore.k.a(new fu.d(), new j());
                } else if (this.N) {
                    com.shopex.westore.k.a(new fu.d(), new g());
                } else {
                    com.shopex.westore.k.a(new fu.d(), new h());
                }
                this.f17851j = false;
            }
            this.f17856o = true;
        } else {
            this.f17856o = false;
            if (this.f17852k != null && this.f17852k.getStatus() == AsyncTask.Status.RUNNING) {
                return;
            }
        }
        this.f17852k = new fu.d();
        if (this.f17860s) {
            if (this.f17856o) {
                this.f17861t = new com.shopex.westore.j(this, this.mActivity, this.f17866y, this.f17855n);
                ((ListView) this.f17848g.getRefreshableView()).setAdapter((ListAdapter) this.f17861t);
                this.f17861t.a(this);
            }
            com.shopex.westore.k.a(this.f17852k, new f(this.f17853l, z2));
            return;
        }
        if (this.f17856o) {
            this.P = new k();
            ((ListView) this.f17848g.getRefreshableView()).setAdapter((ListAdapter) this.P);
        }
        com.shopex.westore.k.a(this.f17852k, new i(this.f17853l, z2));
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.account_click_but:
                showCancelableLoadingDialog();
                com.shopex.westore.k.a(new fu.d(), new c(this.f17853l, this.K.K()));
                return;
            case R.id.account_attention_linear:
                showCancelableLoadingDialog();
                com.shopex.westore.k.a(new fu.d(), new a(this.f17853l, 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.f17853l));
                return;
            case R.id.account_personal_fans_linear:
                startActivity(AgentActivity.a(this.mActivity, (int) AgentActivity.aC).putExtra("userId", this.f17853l));
                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.f17866y.iterator();
        while (it.hasNext()) {
            if (it.next().optString("goods_id").equals(str)) {
                it.remove();
            }
        }
        this.f17861t.notifyDataSetChanged();
    }

    public class k extends BaseAdapter {
        @Override
        public long getItemId(int i2) {
            return i2;
        }

        private k() {
        }

        @Override
        public int getCount() {
            return s.this.f17866y.size();
        }

        @Override
        public JSONObject getItem(int i2) {
            return (JSONObject) s.this.f17866y.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.f17847f.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.f17918h;
                imageView2 = lVar.f17911a;
                commonTextView = lVar.f17921k;
                commonTextView2 = lVar.f17919i;
                commonTextView3 = lVar.f17917g;
                commonTextView4 = lVar.f17916f;
                commonTextView5 = lVar.f17915e;
                commonTextView6 = lVar.f17914d;
                commonTextView7 = lVar.f17913c;
                commonTextView8 = lVar.f17920j;
                imageView3 = lVar.f17922l;
                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(dc.c.f14270ae), imageView);
            commonTextView8.setText(item.optString(ca.c.f4824e));
            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.f17865x * ((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.f17847f.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.f8623g).putExtra(com.shopex.westore.k.f10237i, 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(dc.c.f14270ae);
                                }

                                @Override
                                public String b() {
                                    return com.shopex.westore.util.b.b(item.optString(dc.c.f14270ae));
                                }
                            });
                            lVar2.a(commonTextView20);
                        }
                    });
                    bo.c.a(item.optString("avatar"), imageView2);
                    bo.c.a(item.optString(dc.c.f14270ae), imageView);
                    commonTextView8.setText(item.optString(ca.c.f4824e));
                    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 fu.d(), new b(s.this.f17864w, 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 fu.d(), new d(s.this.f17864w, 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.f8565ay).putExtra("userId", s.this.f17853l));
                        }
                    });
                    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(dc.c.f14270ae);
                        }

                        @Override
                        public String b() {
                            return com.shopex.westore.util.b.b(item.optString(dc.c.f14270ae));
                        }
                    });
                    lVar2.a(commonTextView20);
                }
            });
            bo.c.a(item.optString("avatar"), imageView2);
            bo.c.a(item.optString(dc.c.f14270ae), imageView);
            commonTextView8.setText(item.optString(ca.c.f4824e));
            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 fu.d(), new b(s.this.f17864w, 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 fu.d(), new d(s.this.f17864w, 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.f8565ay).putExtra("userId", s.this.f17853l));
                }
            });
            return view3;
        }
    }

    private class m {
        private ImageView f17925b;
        private TextView f17926c;
        private TextView f17927d;
        private TextView f17928e;
        private ImageView f17929f;

        private m() {
        }
    }

    public class i implements fu.e {
        private boolean f17892b;
        private String f17893c;

        public i(String str, boolean z2) {
            this.f17892b = z2;
            this.f17893c = str;
        }

        @Override
        public void task_response(String str) {
            try {
                s.this.hideLoadingDialog_mt();
                s.this.f17848g.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.f17866y.add(optJSONArray.optJSONObject(i2));
                        }
                    }
                    s.this.P.notifyDataSetChanged();
                }
                if (s.this.f17866y.size() <= 0) {
                    s.this.O.sendEmptyMessage(s.this.f17844c);
                } else {
                    s.this.O.sendEmptyMessage(s.this.f17845d);
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public fu.c task_request() {
            if (this.f17892b) {
                s.this.showCancelableLoadingDialog();
            }
            fu.c cVar = new fu.c("mobileapi.goods.getopinionsformember");
            cVar.a("page", String.valueOf(s.this.f17850i));
            cVar.a("member_id", this.f17893c);
            return cVar;
        }
    }

    public class g implements fu.e {
        g() {
        }

        @Override
        public void task_response(String str) {
            JSONObject optJSONObject;
            try {
                s.this.f17848g.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.f17842a;
                message.obj = optJSONObject;
                s.this.O.sendMessage(message);
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public fu.c task_request() {
            fu.c cVar = new fu.c("mobileapi.goods.get_fans_info");
            cVar.a("member_id", s.this.f17853l);
            cVar.a("fans_id", s.this.f17854m);
            return cVar;
        }
    }

    public class h implements fu.e {
        h() {
        }

        @Override
        public void task_response(String str) {
            JSONObject optJSONObject;
            try {
                s.this.f17848g.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.f17842a;
                message.obj = optJSONObject;
                s.this.O.sendMessage(message);
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public fu.c task_request() {
            fu.c cVar = new fu.c("mobileapi.goods.get_attention_info");
            cVar.a("member_id", s.this.f17853l);
            cVar.a("fans_id", s.this.f17854m);
            return cVar;
        }
    }

    public class j implements fu.e {
        j() {
        }

        @Override
        public void task_response(String str) {
            JSONObject optJSONObject;
            try {
                s.this.f17848g.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.f17842a;
                message.obj = optJSONObject;
                s.this.O.sendMessage(message);
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public fu.c task_request() {
            fu.c cVar = new fu.c("mobileapi.goods.get_member_info");
            cVar.a("son_object", "json");
            return cVar;
        }
    }

    private class c implements fu.e {
        private String f17881b;
        private String f17882c;

        public c(String str, String str2) {
            this.f17881b = str;
            this.f17882c = str2;
        }

        @Override
        public fu.c task_request() {
            s.this.showCancelableLoadingDialog();
            fu.c cVar = new fu.c("mobileapi.member.un_attention");
            cVar.a("member_id", this.f17881b);
            cVar.a("fans_id", this.f17882c);
            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 fu.d(), new h());
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    private class a implements fu.e {
        private String f17875b;
        private String f17876c;

        public a(String str, String str2) {
            this.f17875b = str;
            this.f17876c = str2;
        }

        @Override
        public fu.c task_request() {
            s.this.showCancelableLoadingDialog();
            fu.c cVar = new fu.c("mobileapi.member.attention");
            cVar.a("member_id", this.f17875b);
            cVar.a("fans_id", this.f17876c);
            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 fu.d(), new h());
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    public class f implements fu.e {
        private String f17887b;
        private boolean f17888c;

        public f(String str, boolean z2) {
            this.f17887b = str;
            this.f17888c = z2;
        }

        @Override
        public fu.c task_request() {
            if (this.f17888c) {
                s.this.showCancelableLoadingDialog();
            }
            fu.c cVar = new fu.c("mobileapi.info.favorite");
            cVar.a("member_id", this.f17887b);
            cVar.a("n_page", String.valueOf(s.this.f17850i));
            return cVar;
        }

        @Override
        public void task_response(String str) {
            JSONArray optJSONArray;
            try {
                s.this.hideLoadingDialog_mt();
                JSONObject jSONObject = new JSONObject(str);
                s.this.f17848g.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.f17866y.add(optJSONArray.optJSONObject(i2));
                    }
                    s.this.f17861t.notifyDataSetChanged();
                }
                if (s.this.f17866y.size() <= 0) {
                    s.this.O.sendEmptyMessage(s.this.f17846e);
                } else {
                    s.this.O.sendEmptyMessage(s.this.f17845d);
                }
            } 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 f17911a;
        CommonTextView f17913c;
        CommonTextView f17914d;
        CommonTextView f17915e;
        CommonTextView f17916f;
        CommonTextView f17917g;
        ImageView f17918h;
        CommonTextView f17919i;
        CommonTextView f17920j;
        CommonTextView f17921k;
        ImageView f17922l;
        CommonTextView f17912b = this.f17912b;
        CommonTextView f17912b = this.f17912b;

        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.f17911a = imageView;
            this.f17913c = commonTextView;
            this.f17914d = commonTextView2;
            this.f17915e = commonTextView3;
            this.f17916f = commonTextView4;
            this.f17917g = commonTextView5;
            this.f17918h = imageView2;
            this.f17919i = commonTextView6;
            this.f17920j = commonTextView7;
            this.f17921k = commonTextView8;
            this.f17922l = 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 fu.e {
        private String f17878b;
        private String f17879c;

        public b(String str, String str2) {
            this.f17878b = str;
            this.f17879c = str2;
        }

        @Override
        public fu.c task_request() {
            s.this.showCancelableLoadingDialog();
            fu.c cVar = new fu.c("mobileapi.goods.add_opinions_praise");
            cVar.a("member_id", this.f17878b);
            cVar.a("opinions_id", this.f17879c);
            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 fu.e {
        private String f17884b;
        private String f17885c;

        public d(String str, String str2) {
            this.f17884b = str;
            this.f17885c = str2;
        }

        @Override
        public fu.c task_request() {
            s.this.showCancelableLoadingDialog();
            fu.c cVar = new fu.c("mobileapi.goods.del_opinions_praise");
            cVar.a("opinions_id", this.f17885c);
            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);
    }
}