Commit 5f32350a12edf384f9a9b2d746a4f85ce8722215
1 parent
0c319a2d
Exists in
yxb_dev
and in
1 other branch
no message
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
app/libs/processor.jar
No preview for this file type
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultTwoLevelFragment.java
... | ... | @@ -8,6 +8,7 @@ import android.text.TextUtils; |
8 | 8 | import android.view.View; |
9 | 9 | import android.widget.TextView; |
10 | 10 | |
11 | +import com.jcodecraeer.xrecyclerview.ProgressStyle; | |
11 | 12 | import com.jcodecraeer.xrecyclerview.XRecyclerView; |
12 | 13 | import com.share.mvpsdk.base.BasePresenter; |
13 | 14 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
... | ... | @@ -54,6 +55,8 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
54 | 55 | |
55 | 56 | // mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, 1); |
56 | 57 | recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); |
58 | + recyclerView.setLoadingMoreEnabled(true); | |
59 | + recyclerView.setLoadingMoreProgressStyle(ProgressStyle.LineScale); | |
57 | 60 | recyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { |
58 | 61 | @Override |
59 | 62 | public void onRefresh() { |
... | ... | @@ -69,7 +72,7 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
69 | 72 | // load more data here |
70 | 73 | pageIndex = pageIndex + 1; |
71 | 74 | mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex); |
72 | - recyclerView.refreshComplete(); | |
75 | +// recyclerView.refreshComplete(); | |
73 | 76 | } |
74 | 77 | }); |
75 | 78 | pageIndex = 1; |
... | ... | @@ -95,6 +98,7 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
95 | 98 | if (myConsultAdapter == null) myConsultAdapter = new MyConsultAdapter(getActivity()); |
96 | 99 | if (null == recyclerView.getAdapter()) recyclerView.setAdapter(myConsultAdapter); |
97 | 100 | myConsultAdapter.addAll(myConsultBeanList); |
101 | + recyclerView.loadMoreComplete(); | |
98 | 102 | } |
99 | 103 | |
100 | 104 | @Override | ... | ... |