导航菜单

页面标题

页面副标题

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

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

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


package com.showself.ui;

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.mifeng.ui.R;
import com.r.b.t0;
import com.showself.domain.GetCardClothParser;
import com.showself.domain.LoginResultInfo;
import com.showself.resource.ResourceManager;
import com.showself.show.bean.ClothInfoBean;
import com.showself.utils.Utils;
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 MyClothActivity extends com.showself.ui.c {
    private Button a;
    private TextView b;
    private ListView c;
    private t0 d;

    private LoginResultInfo f2743e;

    private int f2744f;

    private d f2745g;

    private ArrayList<ClothInfoBean> f2746h = new ArrayList<>();

    private int f2747i = 0;

    private String f2748j;

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

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

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

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

    class c implements View.OnClickListener {
        final q a;

        c(MyClothActivity myClothActivity, q qVar) {
            this.a = qVar;
        }

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

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

        @Override
        public void onClick(View view) {
            switch (view.getId()) {
                case R.id.btn_nav_left:
                    MyClothActivity.this.finish();
                    break;
                case R.id.rl_motoring1:
                case R.id.rl_motoring2:
                    if (MyClothActivity.this.f2747i != 0) {
                        MyClothActivity.this.F((ClothInfoBean) view.getTag());
                        break;
                    }
                    break;
                case R.id.user_card_motoring_use1:
                case R.id.user_card_motoring_use2:
                    MyClothActivity.this.G((ClothInfoBean) view.getTag());
                    break;
            }
        }

        d(MyClothActivity myClothActivity, a aVar) {
            this();
        }
    }

    private void D() {
        new com.r.c.c(com.r.c.c.k(String.format(com.showself.net.e.H1, Integer.valueOf(this.f2744f)), 1), new com.r.c.a(), new GetCardClothParser(), this).v(new a());
    }

    public void E(HashMap<Object, Object> hashMap, boolean z) {
        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<ClothInfoBean> arrayList = this.f2746h;
                if (arrayList == null || arrayList.size() == 0) {
                    n nVar = new n(this);
                    this.c.addFooterView(nVar.a());
                    nVar.b(R.drawable.fish_nothing, this.f2748j, TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
                }
                Utils.Z0(this, str);
                return;
            }
            ArrayList<ClothInfoBean> arrayList2 = this.f2746h;
            if (arrayList2 != null) {
                arrayList2.clear();
            }
            ArrayList<ClothInfoBean> arrayList3 = (ArrayList) hashMap.get("entities");
            this.f2746h = arrayList3;
            this.d.a(arrayList3);
            if (z) {
                Utils.Z0(this, "操作成功");
            }
            ArrayList<ClothInfoBean> arrayList4 = this.f2746h;
            if (arrayList4 == null || arrayList4.size() == 0) {
                n nVar2 = new n(this);
                this.c.addFooterView(nVar2.a());
                nVar2.b(R.drawable.fish_nothing, this.f2748j, TbsListener.ErrorCode.NEEDDOWNLOAD_FALSE_5);
            }
        }
    }

    public void F(ClothInfoBean clothInfoBean) {
        q qVar = new q();
        View inflate = View.inflate(this, R.layout.show_cloth_dialog, null);
        ImageView imageView = (ImageView) inflate.findViewById(R.id.iv_cloth_pic);
        TextView textView = (TextView) inflate.findViewById(R.id.tv_cloth_name);
        ImageView imageView2 = (ImageView) inflate.findViewById(R.id.iv_use_level);
        textView.setText(clothInfoBean.getName());
        com.sjvangogh.a.d(clothInfoBean.getIcon(), imageView);
        com.sjvangogh.a.d(ResourceManager.getWealthUrl(clothInfoBean.getUseLevel()), imageView2);
        inflate.findViewById(2131297087).setOnClickListener(new c(this, qVar));
        qVar.j(this, inflate, 1.0f, 17, R.style.anim_sclae_inout_style);
    }

    public void G(ClothInfoBean clothInfoBean) {
        com.r.c.a aVar = new com.r.c.a();
        aVar.b("adminPropId", clothInfoBean.getAdminPropId());
        new com.r.c.c(clothInfoBean.getStatus() == 1 ? com.r.c.c.k(com.showself.net.e.J1, 1) : com.r.c.c.k(com.showself.net.e.I1, 1), aVar, new GetCardClothParser(), this).y(new b());
    }

    @Override
    public void init() {
        this.a = (Button) findViewById(R.id.btn_nav_left);
        this.b = (TextView) findViewById(R.id.tv_nav_title);
        this.c = (ListView) findViewById(R.id.lv_cloth);
        if (this.f2744f == this.f2743e.getUserId()) {
            this.f2747i = 1;
            this.b.setText("我的时装");
            this.f2748j = "您还木有炫酷的时装呢~";
        } else {
            this.b.setText("TA的时装");
            this.f2748j = "TA还木有炫酷的时装呢~";
        }
        this.a.setOnClickListener(this.f2745g);
        t0 t0Var = new t0(this, this.f2747i, this.f2745g);
        this.d = t0Var;
        this.c.setAdapter((ListAdapter) t0Var);
        this.d.a(this.f2746h);
        D();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_my_cloth);
        this.f2744f = getIntent().getIntExtra("id", 0);
        this.f2743e = r0.y(this);
        this.f2745g = new d(this, null);
        init();
    }

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