导航菜单

页面标题

页面副标题

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

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

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


package com.showself.ui.relation;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.AbsListView;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.mifeng.ui.R;
import com.r.b.l1;
import com.showself.domain.FriendInfo;
import com.showself.service.f;
import com.showself.utils.r0;
import com.showself.view.PullToRefreshView;
import com.showself.view.n;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class RelationFansActivity extends com.showself.ui.c implements PullToRefreshView.b {
    private Button a;
    private TextView b;
    private PullToRefreshView c;
    private ListView d;

    private int f3241e;

    private n f3242f;

    private View f3243g;

    private l1 f3245i;

    private Bundle f3246j;

    private int f3247k;
    private int p;
    private int r;

    private List<FriendInfo> f3244h = new ArrayList();
    private int l = 0;
    private int m = 20;
    private boolean n = true;
    private boolean o = false;
    public Handler q = new a();

    class a extends Handler {
        a() {
        }

        @Override
        public void handleMessage(Message message) {
            super.handleMessage(message);
            if (message.what != 1) {
                return;
            }
            RelationFansActivity.this.f3245i.notifyDataSetChanged();
        }
    }

    class b implements AbsListView.OnScrollListener {
        b() {
        }

        @Override
        public void onScroll(AbsListView absListView, int i2, int i3, int i4) {
            int i5 = (i2 + i3) - 1;
            if (RelationFansActivity.this.f3241e == 0 || i5 != i4 - 1) {
                return;
            }
            RelationFansActivity relationFansActivity = RelationFansActivity.this;
            relationFansActivity.H(relationFansActivity.f3247k, RelationFansActivity.this.l, RelationFansActivity.this.m);
        }

        @Override
        public void onScrollStateChanged(AbsListView absListView, int i2) {
            RelationFansActivity.this.f3241e = i2;
        }
    }

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

        @Override
        public void onClick(View view) {
            if (view.getId() != 2131296486) {
                return;
            }
            RelationFansActivity.this.finish();
        }

        c(RelationFansActivity relationFansActivity, a aVar) {
            this();
        }
    }

    public void H(int i2, int i3, int i4) {
        if (!this.n || this.o) {
            return;
        }
        this.o = true;
        if (i3 == 0) {
            this.f3242f.d(0);
        } else {
            this.f3242f.d(1);
        }
        HashMap hashMap = new HashMap();
        hashMap.put("fuid", Integer.valueOf(i2));
        hashMap.put("type", 1);
        hashMap.put("startindex", Integer.valueOf(i3));
        hashMap.put("recordnum", Integer.valueOf(i4));
        addTask(new f(10015, hashMap), this);
    }

    private void I() {
        if (this.n) {
            this.f3242f.d(0);
        } else {
            this.f3242f.d(2);
        }
        this.f3245i.notifyDataSetChanged();
    }

    public void G(int i2, int i3, int i4) {
        this.p = i4;
        this.r = i2;
        if (this.o) {
            return;
        }
        HashMap hashMap = new HashMap();
        hashMap.put("fuid", Integer.valueOf(i3));
        hashMap.put("type", Integer.valueOf(i2));
        addTask(new f(10052, hashMap), getApplicationContext());
    }

    @Override
    public void init() {
        this.b = (TextView) findViewById(R.id.tv_nav_title);
        Button button = (Button) findViewById(R.id.btn_nav_left);
        this.a = button;
        button.setOnClickListener(new c(this, null));
        if (r0.y(this).getUserId() == this.f3247k) {
            this.b.setText(R.string.my_fans);
            this.f3245i = new l1(this, this.f3244h, this, true);
        } else {
            this.f3245i = new l1(this, this.f3244h, this, false);
            this.b.setText(R.string.ta_fans);
        }
        n nVar = new n(this);
        this.f3242f = nVar;
        this.f3243g = nVar.a();
        PullToRefreshView pullToRefreshView = (PullToRefreshView) findViewById(R.id.refresh_fan_relation);
        this.c = pullToRefreshView;
        pullToRefreshView.setOnHeaderRefreshListener(this);
        ListView listView = (ListView) findViewById(R.id.lv_relation_fan_rank);
        this.d = listView;
        listView.addFooterView(this.f3243g);
        this.d.setAdapter((ListAdapter) this.f3245i);
        this.d.setOnScrollListener(new b());
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.relation_fans_tab);
        Bundle extras = getIntent().getExtras();
        this.f3246j = extras;
        this.f3247k = extras.getInt("id");
        if (this.f3246j.containsKey("currentType")) {
            this.f3246j.getInt("currentType");
        }
        if (this.f3246j.containsKey("userId")) {
            this.f3246j.getInt("userId");
        }
        init();
        this.c.f();
    }

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

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

    @Override
    public void p(PullToRefreshView pullToRefreshView) {
        this.l = 0;
        this.n = true;
        H(this.f3247k, 0, this.m);
    }

    @Override
    public void refresh(java.lang.Object... r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.showself.ui.relation.RelationFansActivity.refresh(java.lang.Object[]):void");
    }
}