新闻
This commit is contained in:
parent
d9548a4184
commit
b0accf1e3c
@ -8,6 +8,10 @@ import android.widget.EditText;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
@ -34,9 +38,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import io.reactivex.rxjava3.core.Observer;
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
@ -130,9 +131,9 @@ public class NewsCenterActivity extends BaseActivity {
|
|||||||
mRlvContent.setAdapter(mNewsAdapter);
|
mRlvContent.setAdapter(mNewsAdapter);
|
||||||
mRlvContent.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#b4b4b4")));
|
mRlvContent.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#b4b4b4")));
|
||||||
mNewsAdapter.addOnItemClickListener(newsDetailBean -> ARouter.getInstance()
|
mNewsAdapter.addOnItemClickListener(newsDetailBean -> ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NEWS_DETAIL)
|
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NEWS_DETAIL)
|
||||||
.withString("id", newsDetailBean.getContentId())
|
.withString("id", newsDetailBean.getContentId())
|
||||||
.navigation());
|
.navigation());
|
||||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||||
mSrlContent.setOnLoadMoreListener(v -> doLoadMore());
|
mSrlContent.setOnLoadMoreListener(v -> doLoadMore());
|
||||||
mTvBaseSearchCancel.setOnClickListener(v -> doResetCondition());
|
mTvBaseSearchCancel.setOnClickListener(v -> doResetCondition());
|
||||||
@ -162,43 +163,43 @@ public class NewsCenterActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void getNewsTypeList() {
|
private void getNewsTypeList() {
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(OAApi.class)
|
.create(OAApi.class)
|
||||||
.getNewsTypeList()
|
.getNewsTypeList()
|
||||||
.compose(RxTransformer.getTransformer())
|
.compose(RxTransformer.getTransformer())
|
||||||
.subscribe(new Observer<List<NewsTypeBean>>() {
|
.subscribe(new Observer<List<NewsTypeBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull List<NewsTypeBean> newsTypeBeans) {
|
public void onNext(@io.reactivex.rxjava3.annotations.NonNull List<NewsTypeBean> newsTypeBeans) {
|
||||||
refreshView(STATE_LOAD_SUCCESS);
|
refreshView(STATE_LOAD_SUCCESS);
|
||||||
mTypes.clear();
|
mTypes.clear();
|
||||||
NewsTypeBean bean = new NewsTypeBean();
|
NewsTypeBean bean = new NewsTypeBean();
|
||||||
bean.setChecked(true);
|
bean.setChecked(true);
|
||||||
bean.setCategoryId("");
|
bean.setCategoryId("");
|
||||||
bean.setTitle("全部");
|
bean.setTitle("全部");
|
||||||
mTvType.setText("全部");
|
mTvType.setText("全部");
|
||||||
mSelItemPosition = 0;
|
mSelItemPosition = 0;
|
||||||
mTypes.add(bean);
|
mTypes.add(bean);
|
||||||
mTypes.addAll(newsTypeBeans);
|
mTypes.addAll(newsTypeBeans);
|
||||||
mSelType = bean.getCategoryId();
|
mSelType = bean.getCategoryId();
|
||||||
mTypeAdapter.setData(mTypes);
|
mTypeAdapter.setData(mTypes);
|
||||||
doRefresh();
|
doRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||||
refreshView(STATE_LOAD_ERROR);
|
refreshView(STATE_LOAD_ERROR);
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doResetCondition() {
|
private void doResetCondition() {
|
||||||
@ -231,62 +232,62 @@ public class NewsCenterActivity extends BaseActivity {
|
|||||||
private void getNewsList(int currentPage) {
|
private void getNewsList(int currentPage) {
|
||||||
mCurrentPage = currentPage;
|
mCurrentPage = currentPage;
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(OAApi.class)
|
.create(OAApi.class)
|
||||||
.getNewsList(mCurrentPage + "", mKeywords, mSelType)
|
.getNewsList(mCurrentPage + "", mKeywords, mSelType)
|
||||||
.compose(RxTransformer.getTransformer())
|
.compose(RxTransformer.getTransformer())
|
||||||
.subscribe(new Observer<NewsListBean>() {
|
.subscribe(new Observer<NewsListBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull NewsListBean listBean) {
|
public void onNext(@io.reactivex.rxjava3.annotations.NonNull NewsListBean listBean) {
|
||||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||||
++mCurrentPage;
|
++mCurrentPage;
|
||||||
if (currentPage == 1) {
|
if (currentPage == 1) {
|
||||||
mDatas.clear();
|
mDatas.clear();
|
||||||
mDatas.addAll(listBean.getRows());
|
mDatas.addAll(listBean.getRows());
|
||||||
|
} else {
|
||||||
|
mDatas.addAll(listBean.getRows());
|
||||||
|
}
|
||||||
|
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||||
|
mNewsAdapter.notifyDataSetChanged();
|
||||||
|
mSrlContent.finishRefresh();
|
||||||
|
if (mDatas.size() >= listBean.getTotal()) {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.setNoMoreData(true);
|
||||||
|
} else {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.setNoMoreData(false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mDatas.addAll(listBean.getRows());
|
mSrlContent.finishRefresh();
|
||||||
}
|
|
||||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
|
||||||
mNewsAdapter.notifyDataSetChanged();
|
|
||||||
mSrlContent.finishRefresh();
|
|
||||||
if (mDatas.size() >= listBean.getTotal()) {
|
|
||||||
mSrlContent.finishLoadMore();
|
mSrlContent.finishLoadMore();
|
||||||
mSrlContent.setNoMoreData(true);
|
if (currentPage > 1) {
|
||||||
} else {
|
mSrlContent.setNoMoreData(true);
|
||||||
mSrlContent.finishLoadMore();
|
} else {
|
||||||
mSrlContent.setNoMoreData(false);
|
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||||
}
|
if (!TextUtils.isEmpty(mKeywords)) {
|
||||||
} else {
|
ToastUtils.show("未查询到相关内容");
|
||||||
mSrlContent.finishRefresh();
|
}
|
||||||
mSrlContent.finishLoadMore();
|
|
||||||
if (currentPage > 1) {
|
|
||||||
mSrlContent.setNoMoreData(true);
|
|
||||||
} else {
|
|
||||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
|
||||||
if (!TextUtils.isEmpty(mKeywords)) {
|
|
||||||
ToastUtils.show("未查询到相关内容");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||||
mSrlContent.finishLoadMore();
|
mSrlContent.finishLoadMore();
|
||||||
mSrlContent.finishRefresh();
|
mSrlContent.finishRefresh();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -13,6 +13,8 @@ import android.webkit.WebViewClient;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||||
@ -26,7 +28,6 @@ import com.tenlionsoft.oamodule.R2;
|
|||||||
import com.tenlionsoft.oamodule.beans.NewsDetailBean;
|
import com.tenlionsoft.oamodule.beans.NewsDetailBean;
|
||||||
import com.tenlionsoft.oamodule.net.OAApi;
|
import com.tenlionsoft.oamodule.net.OAApi;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import io.reactivex.rxjava3.core.Observer;
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
@ -79,31 +80,31 @@ public class NewsDetailActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void getDetailById(String id) {
|
private void getDetailById(String id) {
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(OAApi.class)
|
.create(OAApi.class)
|
||||||
.getNewsDetailById(id)
|
.getNewsDetailById(id)
|
||||||
.compose(RxTransformer.getTransformer())
|
.compose(RxTransformer.getTransformer())
|
||||||
.subscribe(new Observer<NewsDetailBean>() {
|
.subscribe(new Observer<NewsDetailBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull NewsDetailBean rowsBean) {
|
public void onNext(@io.reactivex.rxjava3.annotations.NonNull NewsDetailBean rowsBean) {
|
||||||
setDataToView(rowsBean);
|
setDataToView(rowsBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||||
refreshView(STATE_LOAD_ERROR);
|
refreshView(STATE_LOAD_ERROR);
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.tenlionsoft.oamodule.pad.fragments.home.notice;
|
package com.tenlionsoft.oamodule.pad.fragments.home.notice;
|
||||||
|
|
||||||
|
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_EMPTY;
|
||||||
|
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_ERROR;
|
||||||
|
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_LOADING;
|
||||||
|
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_SUCCESS;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@ -11,6 +16,9 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||||
import com.bigkoo.pickerview.view.TimePickerView;
|
import com.bigkoo.pickerview.view.TimePickerView;
|
||||||
@ -26,9 +34,7 @@ import com.tenlionsoft.baselib.utils.LogUtils;
|
|||||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||||
import com.tenlionsoft.oamodule.R;
|
import com.tenlionsoft.oamodule.R;
|
||||||
import com.tenlionsoft.oamodule.R2;
|
import com.tenlionsoft.oamodule.R2;
|
||||||
import com.tenlionsoft.oamodule.adapter.NewsTypeAdapter;
|
|
||||||
import com.tenlionsoft.oamodule.adapter.NoticeAdapter;
|
import com.tenlionsoft.oamodule.adapter.NoticeAdapter;
|
||||||
import com.tenlionsoft.oamodule.beans.NewsTypeBean;
|
|
||||||
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
||||||
import com.tenlionsoft.oamodule.net.OAApi;
|
import com.tenlionsoft.oamodule.net.OAApi;
|
||||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||||
@ -38,19 +44,12 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import io.reactivex.rxjava3.annotations.NonNull;
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
import io.reactivex.rxjava3.core.Observer;
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
import io.reactivex.rxjava3.disposables.Disposable;
|
import io.reactivex.rxjava3.disposables.Disposable;
|
||||||
|
|
||||||
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_EMPTY;
|
|
||||||
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_ERROR;
|
|
||||||
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_LOADING;
|
|
||||||
import static com.tenlionsoft.baselib.core.widget.base.BaseActivity.STATE_LOAD_SUCCESS;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作者: adam
|
* 作者: adam
|
||||||
* 日期: 2022/5/9 - 17:21
|
* 日期: 2022/5/9 - 17:21
|
||||||
@ -187,13 +186,13 @@ public class NoticeListFragment extends BaseFragment {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setTitleText("请选时间")
|
.setTitleText("请选时间")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.isDialog(false)
|
.isDialog(false)
|
||||||
.setType(new boolean[]{true, true, true, false, false, false})
|
.setType(new boolean[]{true, true, true, false, false, false})
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mTimePickerView.show();
|
mTimePickerView.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,62 +260,62 @@ public class NoticeListFragment extends BaseFragment {
|
|||||||
String start = mTvStartDate.getText().toString().trim();
|
String start = mTvStartDate.getText().toString().trim();
|
||||||
String end = mTvEndDate.getText().toString().trim();
|
String end = mTvEndDate.getText().toString().trim();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(OAApi.class)
|
.create(OAApi.class)
|
||||||
.getNoticeList("2",PathConfig.NOTICE_CONFIG_ID,start, end, mKeywords, mCurrentPage + "", "10")
|
.getNoticeList("2", PathConfig.NOTICE_CONFIG_ID, start, end, mKeywords, mCurrentPage + "", "10")
|
||||||
.compose(RxTransformer.getTransformer())
|
.compose(RxTransformer.getTransformer())
|
||||||
.subscribe(new Observer<NoticeListBean>() {
|
.subscribe(new Observer<NoticeListBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull NoticeListBean listBean) {
|
public void onNext(@NonNull NoticeListBean listBean) {
|
||||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||||
++mCurrentPage;
|
++mCurrentPage;
|
||||||
if (currentPage == 1) {
|
if (currentPage == 1) {
|
||||||
mDatas.clear();
|
mDatas.clear();
|
||||||
mDatas.addAll(listBean.getRows());
|
mDatas.addAll(listBean.getRows());
|
||||||
|
} else {
|
||||||
|
mDatas.addAll(listBean.getRows());
|
||||||
|
}
|
||||||
|
refreshPageState(STATE_LOAD_SUCCESS);
|
||||||
|
mAdapter.notifyDataSetChanged();
|
||||||
|
mSrlContent.finishRefresh();
|
||||||
|
if (mDatas.size() >= listBean.getTotal()) {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.setNoMoreData(true);
|
||||||
|
} else {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.setNoMoreData(false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mDatas.addAll(listBean.getRows());
|
mSrlContent.finishRefresh();
|
||||||
}
|
|
||||||
refreshPageState(STATE_LOAD_SUCCESS);
|
|
||||||
mAdapter.notifyDataSetChanged();
|
|
||||||
mSrlContent.finishRefresh();
|
|
||||||
if (mDatas.size() >= listBean.getTotal()) {
|
|
||||||
mSrlContent.finishLoadMore();
|
mSrlContent.finishLoadMore();
|
||||||
mSrlContent.setNoMoreData(true);
|
if (currentPage > 1) {
|
||||||
} else {
|
mSrlContent.setNoMoreData(true);
|
||||||
mSrlContent.finishLoadMore();
|
} else {
|
||||||
mSrlContent.setNoMoreData(false);
|
refreshPageState(STATE_LOAD_EMPTY);
|
||||||
}
|
if (!TextUtils.isEmpty(mKeywords)) {
|
||||||
} else {
|
ToastUtils.show("未查询到相关内容");
|
||||||
mSrlContent.finishRefresh();
|
}
|
||||||
mSrlContent.finishLoadMore();
|
|
||||||
if (currentPage > 1) {
|
|
||||||
mSrlContent.setNoMoreData(true);
|
|
||||||
} else {
|
|
||||||
refreshPageState(STATE_LOAD_EMPTY);
|
|
||||||
if (!TextUtils.isEmpty(mKeywords)) {
|
|
||||||
ToastUtils.show("未查询到相关内容");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
mSrlContent.finishLoadMore();
|
mSrlContent.finishLoadMore();
|
||||||
mSrlContent.finishRefresh();
|
mSrlContent.finishRefresh();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
refreshPageState(STATE_LOAD_ERROR);
|
refreshPageState(STATE_LOAD_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user