导航菜单

页面标题

页面副标题

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

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

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


package com.showself.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.mifeng.ui.R;
import com.r.b.j;
import com.showself.show.bean.AttentionRoomInfo;
import com.showself.utils.Utils;
import com.showself.utils.r0;
import com.showself.view.PullToRefreshView;
import com.showself.view.n;
import com.tencent.smtt.sdk.TbsListener;
import java.util.ArrayList;
import java.util.HashMap;

public class LatelyWatchAnchorActivity extends c implements PullToRefreshView.b {
    private ListView a;
    private j b;
    private PullToRefreshView c;
    private n d;

    private View f2695e;

    private boolean f2696f = false;

    private ArrayList<AttentionRoomInfo> f2697g = new ArrayList<>();

    private TextView f2698h;

    private int f2699i;

    class a implements View.OnClickListener {
        a() {
        }

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

    @Override
    public void init() {
        this.c = (PullToRefreshView) findViewById(R.id.refresh_activity);
        this.a = (ListView) findViewById(R.id.lv_store_content);
        TextView textView = (TextView) findViewById(R.id.tv_nav_title);
        this.f2698h = textView;
        textView.setText("最近浏览");
        findViewById(R.id.btn_nav_left).setOnClickListener(new a());
        n nVar = new n(this);
        this.d = nVar;
        this.f2695e = nVar.a();
        this.b = new j(2, this);
        this.a.addFooterView(this.f2695e);
        this.a.setAdapter((ListAdapter) this.b);
        this.c.setOnHeaderRefreshListener(this);
        this.c.f();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.latelywatch_anchor);
        r0.y(this);
        init();
    }

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

    @Override
    public void p(PullToRefreshView pullToRefreshView) {
        this.f2699i = 0;
        this.f2697g.clear();
    }

    @Override
    public void refresh(Object... objArr) {
        this.c.k();
        ((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 != 0) {
                this.d.b(R.drawable.fish_nothing, "世界之美与您只有一步之遥,快去看直播吧~", TbsListener.ErrorCode.STARTDOWNLOAD_8);
                Utils.Z0(this, str);
                return;
            }
            ArrayList arrayList = (ArrayList) hashMap.get("rooms");
            if (hashMap.containsKey("onlinenum")) {
                this.f2699i += ((Integer) hashMap.get("onlinenum")).intValue();
            }
            if (arrayList == null || arrayList.isEmpty()) {
                this.f2696f = false;
            } else {
                if (arrayList.size() < 100) {
                    this.f2696f = false;
                } else {
                    this.f2696f = true;
                }
                this.f2697g.addAll(arrayList);
                this.f2697g.size();
            }
            if (this.f2697g.isEmpty()) {
                this.d.b(R.drawable.fish_nothing, "世界之美与您只有一步之遥,快去看直播吧~", TbsListener.ErrorCode.STARTDOWNLOAD_8);
            } else if (this.f2696f) {
                this.d.d(0);
            } else {
                this.d.d(3);
            }
            this.b.b(this.f2699i, this.f2697g);
            this.b.notifyDataSetChanged();
        }
    }
}