导航菜单

页面标题

页面副标题

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

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

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


package com.showself.ui;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
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.i2;
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.r0;
import com.showself.view.n;
import com.showself.view.q;
import com.tencent.smtt.sdk.TbsListener;
import java.util.ArrayList;
import java.util.HashMap;

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

    private LoginResultInfo f2915e;

    private int f2916f;

    private f f2917g;

    private ImageLoader f2920j;

    private String f2921k;

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

    private int f2919i = 0;
    private Handler l = new a();

    class a extends Handler {
        a() {
        }

        @Override
        public void handleMessage(Message message) {
            if (VipMoreActivity.this.l == null) {
                return;
            }
            VipMoreActivity.this.refresh(Integer.valueOf(message.what), message.obj, Integer.valueOf(message.arg1));
        }
    }

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

        class a implements l {
            a() {
            }

            @Override
            public void a(boolean z) {
                if (z) {
                    b.this.a.a();
                    b bVar = b.this;
                    VipMoreActivity.this.D(bVar.b.getProductid());
                } else {
                    if (Utils.o0()) {
                        return;
                    }
                    b.this.a.a();
                }
            }
        }

        b(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 = VipMoreActivity.this;
            Utils.Q0(bVar, null, bVar.getString(R.string.buy_prop_prompt), VipMoreActivity.this.getString(R.string.negative), VipMoreActivity.this.getResources().getColor(2131099757), VipMoreActivity.this.getString(R.string.positive), VipMoreActivity.this.getResources().getColor(2131099758), new a(), true);
        }
    }

    class c implements View.OnClickListener {
        final q a;

        c(VipMoreActivity vipMoreActivity, q qVar) {
            this.a = qVar;
        }

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

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

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

    class e implements l {
        e() {
        }

        @Override
        public void a(boolean z) {
            if (z) {
                com.showself.utils.c1.e.a(VipMoreActivity.this);
            }
        }
    }

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

        @Override
        public void onClick(View view) {
            switch (view.getId()) {
                case R.id.btn_nav_left:
                    VipMoreActivity.this.finish();
                    break;
                case R.id.user_card_motoring_cancleuser1:
                case R.id.user_card_motoring_cancleuser2:
                    VipMoreActivity.this.F((PropShallBean) view.getTag());
                    break;
            }
        }

        f(VipMoreActivity vipMoreActivity, a aVar) {
            this();
        }
    }

    private void B(String str) {
        Utils.Q0(this, getString(R.string.prompt), str, getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new e(), true);
    }

    private void C() {
        com.r.c.a aVar = new com.r.c.a();
        aVar.b("fuid", this.f2916f);
        aVar.b("category", 5);
        new com.r.c.c(com.r.c.c.k(com.showself.net.e.J0, 0), aVar, new GetPropShallParser(), this).y(new d());
    }

    public void E(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) {
                ArrayList<PropShallBean> arrayList = this.f2918h;
                if (arrayList == null || arrayList.size() == 0) {
                    n nVar = new n(this);
                    this.c.addFooterView(nVar.a());
                    nVar.b(R.drawable.fish_nothing, this.f2921k, TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
                }
                Utils.Z0(this, str);
                return;
            }
            this.d.notifyDataSetChanged();
            ArrayList<PropShallBean> arrayList2 = (ArrayList) hashMap.get("vipPropsBean");
            this.f2918h = arrayList2;
            this.d.a(arrayList2);
            ArrayList<PropShallBean> arrayList3 = this.f2918h;
            if (arrayList3 == null || arrayList3.size() == 0) {
                n nVar2 = new n(this);
                this.c.addFooterView(nVar2.a());
                nVar2.b(R.drawable.fish_nothing, this.f2921k, TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
            }
        }
    }

    public void D(int i2) {
        HashMap hashMap = new HashMap();
        hashMap.put("product_id", Integer.valueOf(i2));
        addTask(new com.showself.service.f(200043, hashMap), this, this.l);
        Utils.U0(this);
    }

    public void F(PropShallBean propShallBean) {
        q qVar = new q();
        View inflate = View.inflate(this, R.layout.show_prop_dialog, null);
        this.f2920j.displayImage(propShallBean.getV_url(), (ImageView) inflate.findViewById(R.id.iv_show_prop_pic));
        TextView textView = (TextView) inflate.findViewById(R.id.tv_content);
        TextView textView2 = (TextView) inflate.findViewById(R.id.tv_show_prop_gold);
        TextView textView3 = (TextView) inflate.findViewById(R.id.tv_show_prop_renewals);
        textView.setText(propShallBean.getName());
        textView2.setText(getString(R.string.text_buy_price) + propShallBean.getPrice() + getString(R.string.text_buy_unit));
        textView3.setText(getString(R.string.text_renew_price) + propShallBean.getRenew_price() + getString(R.string.text_buy_unit));
        Button button = (Button) inflate.findViewById(R.id.bt_buy);
        button.setText("续费");
        button.setOnClickListener(new b(qVar, propShallBean));
        inflate.findViewById(2131297087).setOnClickListener(new c(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.setSelected(true);
        this.a.setOnClickListener(this.f2917g);
        this.c = (ListView) findViewById(R.id.lv_glory_user);
        if (this.f2916f == this.f2915e.getUserId()) {
            this.b.setText("我的会员");
            this.f2919i = 1;
            this.f2921k = "您还木有会员呢~";
        } else {
            this.f2921k = "TA还木有会员呢~";
            this.b.setText("Ta的会员");
        }
        i2 i2Var = new i2(this, this.f2919i, this.f2917g);
        this.d = i2Var;
        this.c.setAdapter((ListAdapter) i2Var);
        this.d.a(this.f2918h);
        C();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.motoring_more_layout);
        this.f2916f = getIntent().getIntExtra("id", 0);
        this.f2920j = ImageLoader.getInstance(this);
        this.f2915e = r0.y(this);
        this.f2917g = new f(this, null);
        init();
    }

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

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

    @Override
    public void refresh(Object... objArr) {
        Utils.n(null);
        ((Integer) objArr[0]).intValue();
        HashMap hashMap = (HashMap) objArr[1];
        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 == -300) {
                B(str);
            } else if (intValue != 0) {
                Utils.Z0(this, str);
            } else {
                C();
                Utils.Z0(this, str);
            }
        }
    }
}