正在查看: 自健身 v3.3.4 应用的 MineRequestionsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 自健身 v3.3.4 应用的 MineRequestionsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mu.gymtrain.Activity;
import android.content.res.Resources;
import android.view.View;
import android.widget.TextView;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.AdaptScreenUtils;
import com.mu.gymtrain.Adapter.AiMineRequestionsAdapter;
import com.mu.gymtrain.Base.BaseActivity;
import com.mu.gymtrain.Bean.VideRequestListBean;
import com.mu.gymtrain.R;
import com.mu.gymtrain.viewmodel.MineRequestionViewModel;
import java.util.List;
public class MineRequestionsActivity extends BaseActivity {
private AiMineRequestionsAdapter adapter;
private int page = 1;
private int videoId;
private MineRequestionViewModel viewModel;
public int getContentLayout() {
return R.layout.activity_video_list_requestions_layout;
}
public void initView() {
this.videoId = getIntent().getIntExtra("videoId", -1);
String stringExtra = getIntent().getStringExtra("title");
((TextView) findViewById(R.id.tvTitle)).setText(stringExtra + "学习足迹");
findViewById(R.id.imgBack).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MineRequestionsActivity.this.lambda$initView$0$MineRequestionsActivity(view);
}
});
this.viewModel = (MineRequestionViewModel) new ViewModelProvider(this).get(MineRequestionViewModel.class);
RecyclerView findViewById = findViewById(2131297022);
findViewById.setLayoutManager(new LinearLayoutManager(this));
AiMineRequestionsAdapter aiMineRequestionsAdapter = new AiMineRequestionsAdapter();
this.adapter = aiMineRequestionsAdapter;
findViewById.setAdapter(aiMineRequestionsAdapter);
}
public void lambda$initView$0$MineRequestionsActivity(View view) {
finish();
}
public void initData() {
showProgress();
this.viewModel.requestData(this.page, this.videoId, new MineRequestionViewModel.OnAiCallBack<List<VideRequestListBean.DataBean.ListBean>>() {
@Override
public void onSuccess(List<VideRequestListBean.DataBean.ListBean> listBeans) {
MineRequestionsActivity.this.dismissProgress();
MineRequestionsActivity.this.adapter.setNewData(listBeans);
}
@Override
public void onFail(String msg) {
MineRequestionsActivity.this.showToast(msg);
MineRequestionsActivity.this.dismissProgress();
}
});
}
public Resources getResources() {
return AdaptScreenUtils.adaptWidth(super.getResources(), 1080);
}
}