导航菜单

页面标题

页面副标题

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

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

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


package com.showself.my.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.mifeng.ui.R;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.PrettyBean;
import com.showself.service.f;
import com.showself.utils.Utils;
import com.showself.utils.c1.e;
import com.showself.utils.r;
import com.showself.utils.r0;
import com.showself.utils.u0;
import com.showself.view.ImmersiveStatusBar;
import com.showself.view.n;
import com.showself.view.p;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.tencent.smtt.sdk.TbsListener;
import java.util.ArrayList;
import java.util.HashMap;

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

    private com.r.k.a.a f2307e;

    private LoginResultInfo f2308f;

    private int f2309g;

    private c f2310h;

    private String f2313k;

    private ArrayList<PrettyBean> f2311i = new ArrayList<>();

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

    class a extends Handler {
        a() {
        }

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

    class b implements p.c {
        b() {
        }

        @Override
        public void a() {
            if (Utils.o0()) {
                return;
            }
            e.a(PrettySignActivity.this);
        }
    }

    private class c implements View.OnClickListener {

        class a implements p.c {
            final PrettyBean a;

            a(PrettyBean prettyBean) {
                this.a = prettyBean;
            }

            @Override
            public void a() {
                if (Utils.o0()) {
                    return;
                }
                PrettySignActivity.this.E(this.a);
            }
        }

        private c() {
        }

        @Override
        public void onClick(View view) {
            if (Utils.o0()) {
            }
            int id = view.getId();
            if (id == 2131296486) {
                PrettySignActivity.this.finish();
                return;
            }
            switch (id) {
                case R.id.user_card_motoring_cancleuser1:
                case R.id.user_card_motoring_cancleuser2:
                    PrettyBean prettyBean = (PrettyBean) view.getTag();
                    Utils.T0(PrettySignActivity.this, "确定续费靓号 ", prettyBean.getName(), prettyBean.getDuration() + "", new a(prettyBean), null);
                    break;
                case R.id.user_card_motoring_use1:
                case R.id.user_card_motoring_use2:
                    PrettySignActivity.this.G((PrettyBean) view.getTag());
                    break;
            }
        }

        c(PrettySignActivity prettySignActivity, a aVar) {
            this();
        }
    }

    private void C(String str) {
        Utils.S0(this, getResources().getString(R.string.sweet_hint), str, getResources().getString(R.string.get_money_free), new b());
    }

    private void D() {
        HashMap hashMap = new HashMap();
        hashMap.put(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.f2309g));
        addTask(new f(20112, hashMap), this, this.l);
    }

    public void E(PrettyBean prettyBean) {
        HashMap hashMap = new HashMap();
        hashMap.put("adminPropId", Integer.valueOf(prettyBean.getAdminPropId()));
        addTask(new f(20111, hashMap), this, this.l);
    }

    public static void F(Context context, int i2) {
        Intent intent = new Intent(context, (Class<?>) PrettySignActivity.class);
        intent.putExtra("current_user_id", i2);
        context.startActivity(intent);
    }

    public void G(PrettyBean prettyBean) {
        HashMap hashMap = new HashMap();
        hashMap.put("adminPropId", Integer.valueOf(prettyBean.getAdminPropId()));
        if (prettyBean.getStatus() == 0) {
            addTask(new f(20113, hashMap), this, this.l);
        } else {
            addTask(new f(20114, hashMap), this, this.l);
        }
    }

    @Override
    public void init() {
        this.a = (Button) findViewById(R.id.btn_nav_left);
        this.b = (TextView) findViewById(R.id.tv_nav_title);
        this.d = (ImmersiveStatusBar) findViewById(2131298726);
        this.b.setText("我的靓号");
        this.b.setSelected(true);
        this.a.setOnClickListener(this.f2310h);
        this.c = (ListView) findViewById(R.id.lv_glory_user);
        if (this.f2309g == this.f2308f.getUserId()) {
            this.f2312j = 1;
        }
        com.r.k.a.a aVar = new com.r.k.a.a(this, this.f2312j, this.f2310h);
        this.f2307e = aVar;
        this.c.setAdapter((ListAdapter) aVar);
        this.f2307e.a(this.f2311i);
        D();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.motoring_more_layout);
        u0.q(this, null);
        this.f2309g = getIntent().getIntExtra("current_user_id", 0);
        this.f2308f = r0.y(this);
        this.f2310h = new c(this, null);
        this.f2313k = getResources().getText(R.string.tex_no_pretty).toString();
        init();
        u0.i(this, this.d, R.color.navigationbar_bg, true);
    }

    @Override
    public void refresh(Object... objArr) {
        int intValue = ((Integer) objArr[0]).intValue();
        HashMap hashMap = (HashMap) objArr[1];
        if (hashMap != null) {
            int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
            String str = (String) hashMap.get(com.showself.net.e.o1);
            switch (intValue) {
                case 20111:
                    if (intValue2 != 0) {
                        if (intValue2 != -300) {
                            Utils.Z0(this, str);
                            break;
                        } else {
                            C(str);
                            break;
                        }
                    } else {
                        Utils.Z0(this, str);
                        D();
                        break;
                    }
                case 20112:
                    if (intValue2 != 0) {
                        Utils.Z0(this, str);
                    } else if (hashMap.get("data") != null) {
                        ArrayList<PrettyBean> arrayList = (ArrayList) hashMap.get("data");
                        this.f2311i = arrayList;
                        this.f2307e.a(arrayList);
                    }
                    ArrayList<PrettyBean> arrayList2 = this.f2311i;
                    if (arrayList2 == null || arrayList2.size() == 0) {
                        n nVar = new n(this);
                        this.c.addFooterView(nVar.a());
                        nVar.c(R.drawable.icon_no_manager, this.f2313k, r.a(110.0f), r.a(110.0f), TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
                        break;
                    }
                    break;
                case 20113:
                case 20114:
                    if (intValue2 != 0) {
                        Utils.Z0(this, str);
                        break;
                    } else if (hashMap.get("data") != null) {
                        ArrayList<PrettyBean> arrayList3 = (ArrayList) hashMap.get("data");
                        this.f2311i = arrayList3;
                        this.f2307e.a(arrayList3);
                        break;
                    }
                    break;
            }
        }
    }
}