正在查看: Easycash v3.75.13 应用的 OrderFlowsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Easycash v3.75.13 应用的 OrderFlowsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fintopia.lender.module.orders;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import com.fintopia.lender.R;
import com.fintopia.lender.module.baseui.LenderCommonActivity;
import com.fintopia.lender.module.network.ILenderApiRoutes;
import com.fintopia.lender.module.orders.adapter.OrderFlowsAdapter;
import com.fintopia.lender.module.orders.models.OrderFlow;
import com.fintopia.lender.module.orders.models.OrderFlowsResponse;
import com.fintopia.lender.widget.LenderBaseItemDecoration;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.model.IdnObserver;
import com.lingyue.supertoolkit.customtools.CollectionUtils;
import io.reactivex.disposables.Disposable;
import java.util.List;
public class OrderFlowsActivity extends LenderCommonActivity {
@BindView(5151)
LinearLayout llNoTradeRecord;
@BindView(5372)
RecyclerView rvTradeRecords;
private final int f111u = 10;
private boolean f112v = false;
private int f113w = 0;
private boolean f114x = false;
private OrderFlowsAdapter y;
private void R() {
this.y = new OrderFlowsAdapter(this);
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
this.rvTradeRecords.setLayoutManager(linearLayoutManager);
this.rvTradeRecords.setAdapter(this.y);
Resources resources = getResources();
int i = R.dimen.ds50;
this.rvTradeRecords.addItemDecoration(new LenderBaseItemDecoration(resources.getDimensionPixelSize(i), getResources().getDimensionPixelSize(R.dimen.ds12), getResources().getDimensionPixelSize(i), getResources().getDimensionPixelSize(R.dimen.ds0)));
this.rvTradeRecords.addOnScrollListener(new RecyclerView.OnScrollListener() {
public void onScrolled(RecyclerView recyclerView, int i2, int i3) {
super.onScrolled(recyclerView, i2, i3);
if (linearLayoutManager.findLastCompletelyVisibleItemPosition() != linearLayoutManager.getItemCount() - 1 || i3 <= 0 || OrderFlowsActivity.this.f112v || OrderFlowsActivity.this.f114x) {
return;
}
OrderFlowsActivity.this.f113w++;
OrderFlowsActivity.this.f112v = true;
OrderFlowsActivity.this.T();
}
});
}
public void S(OrderFlowsResponse orderFlowsResponse) {
List<OrderFlow> list = orderFlowsResponse.body.orderFlows;
if (CollectionUtils.f(list) && this.f113w == 0) {
this.rvTradeRecords.setVisibility(8);
this.llNoTradeRecord.setVisibility(0);
} else {
if (CollectionUtils.f(list)) {
this.f114x = true;
this.y.b();
return;
}
this.y.a(list);
if (list.size() < 10) {
this.f114x = true;
this.y.b();
}
}
}
public void T() {
((ILenderApiRoutes) this.apiHelper.a()).V0(this.f113w * 10, 10).a(new IdnObserver<OrderFlowsResponse>(this) {
public void onError(Throwable th, OrderFlowsResponse orderFlowsResponse) {
super.onError(th, orderFlowsResponse);
OrderFlowsActivity.this.f112v = false;
}
public void onSuccess(OrderFlowsResponse orderFlowsResponse) {
OrderFlowsActivity.this.f112v = false;
OrderFlowsActivity.this.S(orderFlowsResponse);
}
});
}
public static void startOrderFlowsActivity(Activity activity) {
activity.startActivity(new Intent(activity, (Class<?>) OrderFlowsActivity.class));
}
@Override
protected void A() {
super.A();
R();
}
@Override
public int getLayoutID() {
return R.layout.lender_activity_order_flows;
}
@Override
protected void init() {
super.init();
T();
}
@Override
public Disposable runOnActiveEvent(Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.a(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnCreated(@NonNull Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.b(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnDestroy(@NonNull Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.c(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.d(this, lifecycleEvent, runnable);
}
@Override
public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
return com.lingyue.idnbaselib.framework.lifecycle.m.e(this, lifecycleEventArr, runnable);
}
}