正在查看: 95爱播免登录版 v3.1.9 应用的 LoveNotificationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 LoveNotificationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui.notificationbox;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AdapterView;
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.q0;
import com.showself.domain.FriendInfo;
import com.showself.net.e;
import com.showself.service.f;
import com.showself.service.g;
import com.showself.ui.CardActivity;
import com.showself.utils.Utils;
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 LoveNotificationActivity extends com.showself.ui.c implements PullToRefreshView.b {
private Button a;
private TextView b;
private ListView c;
private q0 f3206e;
private PullToRefreshView f3207f;
private int f3208g;
private n f3209h;
private View f3210i;
private List<FriendInfo> d = new ArrayList();
private int f3211j = 0;
private int f3212k = 20;
private boolean l = true;
private boolean m = false;
private View.OnClickListener n = new a();
class a implements View.OnClickListener {
a() {
}
@Override
public void onClick(View view) {
if (view.getId() != 2131296486) {
return;
}
LoveNotificationActivity.this.finish();
}
}
class b implements AbsListView.OnScrollListener {
b() {
}
@Override
public void onScroll(AbsListView absListView, int i2, int i3, int i4) {
int i5 = (i2 + i3) - 1;
if (LoveNotificationActivity.this.f3208g == 0 || i5 != i4 - 1) {
return;
}
LoveNotificationActivity.this.E();
}
@Override
public void onScrollStateChanged(AbsListView absListView, int i2) {
LoveNotificationActivity.this.f3208g = i2;
}
}
private class c implements AdapterView.OnItemClickListener {
private c() {
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i2, long j2) {
if (LoveNotificationActivity.this.d == null || LoveNotificationActivity.this.d.size() <= 0 || i2 >= LoveNotificationActivity.this.d.size()) {
return;
}
FriendInfo friendInfo = (FriendInfo) LoveNotificationActivity.this.d.get(i2);
Intent intent = new Intent();
intent.setClass(LoveNotificationActivity.this, CardActivity.class);
intent.putExtra("id", friendInfo.getUid());
LoveNotificationActivity.this.startActivity(intent);
}
c(LoveNotificationActivity loveNotificationActivity, a aVar) {
this();
}
}
private void D() {
this.f3207f.k();
if (this.l) {
this.f3209h.d(0);
} else {
this.f3209h.d(2);
}
this.f3206e.notifyDataSetChanged();
}
public void E() {
if (!this.l || this.m) {
return;
}
this.m = true;
if (this.f3211j == 0) {
this.f3209h.d(0);
} else {
this.f3209h.d(1);
}
HashMap hashMap = new HashMap();
hashMap.put("fuid", Integer.valueOf(r0.y(this).getUserId()));
hashMap.put("startindex", Integer.valueOf(this.f3211j));
hashMap.put("recordnum", Integer.valueOf(this.f3212k));
hashMap.put("type", "love");
addTask(new f(10018, hashMap), this);
}
@Override
public void addTask(f fVar, Context context) {
super.addTask(fVar, context);
}
@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.setText(getResources().getString(R.string.love_notification_act_title));
this.a.setOnClickListener(this.n);
n nVar = new n(this);
this.f3209h = nVar;
this.f3210i = nVar.a();
PullToRefreshView pullToRefreshView = (PullToRefreshView) findViewById(R.id.refresh_system_notification);
this.f3207f = pullToRefreshView;
pullToRefreshView.setOnHeaderRefreshListener(this);
ListView listView = (ListView) findViewById(2131297980);
this.c = listView;
listView.addFooterView(this.f3210i);
q0 q0Var = new q0(this, this.d);
this.f3206e = q0Var;
this.c.setAdapter((ListAdapter) q0Var);
this.c.setOnItemClickListener(new c(this, null));
this.c.setOnScrollListener(new b());
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.system_notification_act);
init();
this.f3207f.f();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onStop() {
super.onStop();
}
@Override
public void p(PullToRefreshView pullToRefreshView) {
this.f3211j = 0;
this.l = true;
E();
}
@Override
public void refresh(Object... objArr) {
this.m = false;
int intValue = ((Integer) objArr[0]).intValue();
HashMap hashMap = (HashMap) objArr[1];
if (hashMap != null) {
int intValue2 = ((Integer) hashMap.get(e.n1)).intValue();
String str = (String) hashMap.get(e.o1);
if (intValue == 10018) {
if (intValue2 == e.m1) {
if (this.f3211j == 0) {
this.d.clear();
}
List list = (List) hashMap.get("friends");
if (list != null) {
this.d.addAll(list);
if (list.size() < this.f3212k) {
this.l = false;
} else {
this.l = true;
}
this.f3211j += list.size();
} else {
this.l = false;
}
} else {
Utils.Z0(this, str);
}
}
}
D();
g.i(this);
}
}