Commit 5f32350a12edf384f9a9b2d746a4f85ce8722215

Authored by 陶汉栋
1 parent 0c319a2d
Exists in yxb_dev and in 1 other branch developer

no message

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,6 +8,7 @@ import android.text.TextUtils;
8 import android.view.View; 8 import android.view.View;
9 import android.widget.TextView; 9 import android.widget.TextView;
10 10
  11 +import com.jcodecraeer.xrecyclerview.ProgressStyle;
11 import com.jcodecraeer.xrecyclerview.XRecyclerView; 12 import com.jcodecraeer.xrecyclerview.XRecyclerView;
12 import com.share.mvpsdk.base.BasePresenter; 13 import com.share.mvpsdk.base.BasePresenter;
13 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 14 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
@@ -54,6 +55,8 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon @@ -54,6 +55,8 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon
54 55
55 // mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, 1); 56 // mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, 1);
56 recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); 57 recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
  58 + recyclerView.setLoadingMoreEnabled(true);
  59 + recyclerView.setLoadingMoreProgressStyle(ProgressStyle.LineScale);
57 recyclerView.setLoadingListener(new XRecyclerView.LoadingListener() { 60 recyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
58 @Override 61 @Override
59 public void onRefresh() { 62 public void onRefresh() {
@@ -69,7 +72,7 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon @@ -69,7 +72,7 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon
69 // load more data here 72 // load more data here
70 pageIndex = pageIndex + 1; 73 pageIndex = pageIndex + 1;
71 mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex); 74 mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex);
72 - recyclerView.refreshComplete(); 75 +// recyclerView.refreshComplete();
73 } 76 }
74 }); 77 });
75 pageIndex = 1; 78 pageIndex = 1;
@@ -95,6 +98,7 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon @@ -95,6 +98,7 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon
95 if (myConsultAdapter == null) myConsultAdapter = new MyConsultAdapter(getActivity()); 98 if (myConsultAdapter == null) myConsultAdapter = new MyConsultAdapter(getActivity());
96 if (null == recyclerView.getAdapter()) recyclerView.setAdapter(myConsultAdapter); 99 if (null == recyclerView.getAdapter()) recyclerView.setAdapter(myConsultAdapter);
97 myConsultAdapter.addAll(myConsultBeanList); 100 myConsultAdapter.addAll(myConsultBeanList);
  101 + recyclerView.loadMoreComplete();
98 } 102 }
99 103
100 @Override 104 @Override