导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - MotoringMoreActivity.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 MotoringMoreActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.showself.ui;

import android.content.Intent;
import android.os.Bundle;
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.o;
import com.showself.domain.GetCardMotoringParser;
import com.showself.domain.GetPropShallParser;
import com.showself.domain.LoginResultInfo;
import com.showself.show.bean.PropShallBean;
import com.showself.utils.Utils;
import com.showself.utils.l;
import com.showself.utils.r;
import com.showself.utils.r0;
import com.showself.view.n;
import com.showself.view.q;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.tencent.smtt.sdk.TbsListener;
import com.tencent.tauth.AuthActivity;
import java.util.ArrayList;
import java.util.HashMap;

public class MotoringMoreActivity extends com.showself.ui.c {
    private Button a;
    private TextView b;
    private ListView c;
    private o d;

    private LoginResultInfo f2736e;

    private int f2737f;

    private h f2738g;

    private ArrayList<PropShallBean> f2739h = new ArrayList<>();

    private int f2740i = 0;

    private ImageLoader f2741j;

    private String f2742k;

    class a implements com.r.c.d {
        a() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            MotoringMoreActivity.this.K((HashMap) obj, Boolean.FALSE);
        }
    }

    class b implements com.r.c.d {
        b() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            MotoringMoreActivity.this.K((HashMap) obj, Boolean.TRUE);
        }
    }

    class c implements View.OnClickListener {
        final q a;
        final PropShallBean b;

        class a implements l {
            a() {
            }

            @Override
            public void a(boolean z) {
                if (!z) {
                    if (Utils.o0()) {
                        return;
                    }
                    c.this.a.a();
                } else {
                    if (Utils.o0()) {
                        return;
                    }
                    c.this.a.a();
                    c cVar = c.this;
                    MotoringMoreActivity.this.E(cVar.b);
                }
            }
        }

        c(q qVar, PropShallBean propShallBean) {
            this.a = qVar;
            this.b = propShallBean;
        }

        @Override
        public void onClick(View view) {
            if (Utils.o0()) {
                return;
            }
            androidx.fragment.app.b bVar = MotoringMoreActivity.this;
            Utils.Q0(bVar, null, bVar.getString(R.string.dialog_text_ask_renew), MotoringMoreActivity.this.getString(R.string.negative), MotoringMoreActivity.this.getResources().getColor(2131099757), MotoringMoreActivity.this.getString(R.string.positive), MotoringMoreActivity.this.getResources().getColor(2131099758), new a(), true);
        }
    }

    class d implements View.OnClickListener {
        final q a;

        d(MotoringMoreActivity motoringMoreActivity, q qVar) {
            this.a = qVar;
        }

        @Override
        public void onClick(View view) {
            this.a.a();
        }
    }

    class e implements com.r.c.d {
        e() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            MotoringMoreActivity.this.J((HashMap) obj);
        }
    }

    class f implements l {
        f() {
        }

        @Override
        public void a(boolean z) {
            if (!z || Utils.o0()) {
                return;
            }
            com.showself.utils.c1.e.a(MotoringMoreActivity.this);
        }
    }

    class g implements com.r.c.d {
        g() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            MotoringMoreActivity.this.I((HashMap) obj);
        }
    }

    private class h implements View.OnClickListener {
        private h() {
        }

        @Override
        public void onClick(View view) {
            int id = view.getId();
            if (id == 2131296486) {
                MotoringMoreActivity.this.finish();
            }
            switch (id) {
                case R.id.user_card_motoring_cancleuser1:
                case R.id.user_card_motoring_cancleuser2:
                    MotoringMoreActivity.this.L((PropShallBean) view.getTag());
                    break;
                case R.id.user_card_motoring_use1:
                case R.id.user_card_motoring_use2:
                    MotoringMoreActivity.this.M((PropShallBean) view.getTag());
                    break;
            }
        }

        h(MotoringMoreActivity motoringMoreActivity, a aVar) {
            this();
        }
    }

    public void E(PropShallBean propShallBean) {
        com.r.c.a aVar = new com.r.c.a();
        aVar.b("admin_pid", propShallBean.getRenew_pid());
        aVar.b("fuid", this.f2737f);
        aVar.b(Oauth2AccessToken.KEY_UID, this.f2737f);
        aVar.b("type", 2);
        aVar.b("used", 2);
        aVar.b("roomid", 7000000);
        new com.r.c.c(com.r.c.c.k(com.showself.net.e.M0, 0), aVar, new GetCardMotoringParser(), this).y(new e());
    }

    private void F(String str) {
        Utils.Q0(this, getString(R.string.sweet_hint), str, getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.get_money_free), getResources().getColor(2131099758), new f(), true);
    }

    private void G() {
        com.r.c.a aVar = new com.r.c.a();
        aVar.b("fuid", this.f2737f);
        aVar.b("category", 2);
        new com.r.c.c(com.r.c.c.k(com.showself.net.e.J0, 0), aVar, new GetCardMotoringParser(), this).y(new a());
    }

    private void H() {
        com.r.c.a aVar = new com.r.c.a();
        aVar.b("anchor_uid", this.f2737f);
        aVar.b("type", 2);
        aVar.b("startindex", 0);
        aVar.b("recordnum", 20);
        new com.r.c.c(com.r.c.c.k("serv_getprop_shall.php", 0), aVar, new GetPropShallParser(), this).y(new g());
    }

    public void I(HashMap<Object, Object> hashMap) {
        if (hashMap != null) {
            int intValue = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
            String str = (String) hashMap.get(com.showself.net.e.o1);
            if (intValue != com.showself.net.e.m1) {
                Utils.Z0(this, str);
                return;
            }
            this.d.notifyDataSetChanged();
            ArrayList<PropShallBean> arrayList = (ArrayList) hashMap.get("vehiclePropsBean");
            this.f2739h = arrayList;
            this.d.a(arrayList);
        }
    }

    public void J(HashMap<Object, Object> hashMap) {
        if (hashMap != null) {
            int intValue = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
            String str = (String) hashMap.get(com.showself.net.e.o1);
            if (intValue == com.showself.net.e.m1) {
                H();
                Utils.Z0(this, str);
            } else if (intValue == -300) {
                F(str);
            } else {
                G();
                Utils.Z0(this, str);
            }
        }
    }

    public void K(HashMap<Object, Object> hashMap, Boolean bool) {
        if (hashMap != null) {
            int intValue = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
            String str = (String) hashMap.get(com.showself.net.e.o1);
            if (intValue != com.showself.net.e.m1) {
                ArrayList<PropShallBean> arrayList = this.f2739h;
                if (arrayList == null || arrayList.size() == 0) {
                    n nVar = new n(this);
                    this.c.addFooterView(nVar.a());
                    nVar.c(R.drawable.icon_no_manager, this.f2742k, r.a(110.0f), r.a(110.0f), TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
                }
                Utils.Z0(this, str);
                return;
            }
            ArrayList<PropShallBean> arrayList2 = this.f2739h;
            if (arrayList2 != null) {
                arrayList2.clear();
            }
            ArrayList<PropShallBean> arrayList3 = (ArrayList) hashMap.get("tag");
            this.f2739h = arrayList3;
            this.d.a(arrayList3);
            if (bool.booleanValue()) {
                Utils.Z0(this, str);
            }
            ArrayList<PropShallBean> arrayList4 = this.f2739h;
            if (arrayList4 == null || arrayList4.size() == 0) {
                n nVar2 = new n(this);
                this.c.addFooterView(nVar2.a());
                nVar2.c(R.drawable.icon_no_manager, this.f2742k, r.a(110.0f), r.a(110.0f), TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
            }
        }
    }

    public void M(PropShallBean propShallBean) {
        com.r.c.a aVar = new com.r.c.a();
        aVar.b("admin_pid", propShallBean.getAdmin_pid());
        aVar.b("status", propShallBean.getStatus());
        aVar.b(AuthActivity.ACTION_KEY, 40);
        aVar.b(Oauth2AccessToken.KEY_UID, this.f2737f);
        aVar.b("roomid", 7000000);
        new com.r.c.c(com.r.c.c.k("serv_interact_shall.php", 0), aVar, new GetCardMotoringParser(), this).y(new b());
    }

    public void L(PropShallBean propShallBean) {
        q qVar = new q();
        View inflate = View.inflate(this, R.layout.show_prop_dialog, null);
        this.f2741j.displayImage(propShallBean.getPic_url(), (ImageView) inflate.findViewById(R.id.iv_show_prop_pic));
        ((TextView) inflate.findViewById(R.id.tv_content)).setText(propShallBean.getName());
        TextView textView = (TextView) inflate.findViewById(R.id.tv_show_prop_gold);
        TextView textView2 = (TextView) inflate.findViewById(R.id.tv_show_prop_renewals);
        textView.setText("购买价格" + propShallBean.getPrice() + "/个");
        textView2.setText("续费价格" + propShallBean.getRenew_price() + "/个");
        ((TextView) inflate.findViewById(R.id.show_prop_descr)).setText(propShallBean.getDesc());
        Button button = (Button) inflate.findViewById(R.id.bt_buy);
        button.setText("续费");
        button.setOnClickListener(new c(qVar, propShallBean));
        inflate.findViewById(2131297087).setOnClickListener(new d(this, qVar));
        qVar.j(this, inflate, 1.0f, 17, R.style.anim_sclae_inout_style);
    }

    @Override
    public void init() {
        this.a = (Button) findViewById(R.id.btn_nav_left);
        TextView textView = (TextView) findViewById(R.id.tv_nav_title);
        this.b = textView;
        textView.setText("座驾");
        this.b.setSelected(true);
        this.a.setOnClickListener(this.f2738g);
        this.c = (ListView) findViewById(R.id.lv_glory_user);
        if (this.f2737f == this.f2736e.getUserId()) {
            this.f2740i = 1;
            this.f2742k = "您还木有炫酷的座驾呢~";
        } else {
            this.f2742k = "TA还木有炫酷的座驾呢~";
        }
        o oVar = new o(this, this.f2740i, this.f2738g);
        this.d = oVar;
        this.c.setAdapter((ListAdapter) oVar);
        this.d.a(this.f2739h);
        G();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.motoring_more_layout);
        Intent intent = getIntent();
        this.f2739h = (ArrayList) intent.getSerializableExtra("list");
        this.f2737f = intent.getIntExtra("id", 0);
        this.f2741j = ImageLoader.getInstance(this);
        this.f2736e = r0.y(this);
        this.f2738g = new h(this, null);
        init();
    }

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

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    public void refresh(Object... objArr) {
    }
}