|
|
@@ -15,6 +15,7 @@ import android.widget.AdapterView;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.ListView;
|
|
|
import android.widget.PopupWindow;
|
|
|
+import android.widget.ScrollView;
|
|
|
import android.widget.SimpleAdapter;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
@@ -29,6 +30,8 @@ import com.core.utils.CommonUtil;
|
|
|
import com.core.utils.time.wheel.DatePicker;
|
|
|
import com.core.widget.MyListView;
|
|
|
import com.core.widget.view.MyGridView;
|
|
|
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
|
|
|
+import com.handmark.pulltorefresh.library.PullToRefreshScrollView;
|
|
|
import com.modular.apputils.activity.BillDetailsActivity;
|
|
|
import com.modular.apputils.activity.BillInputActivity;
|
|
|
import com.modular.apputils.activity.BillListActivity;
|
|
|
@@ -66,6 +69,7 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
private TextView customerCareRefTimeTv;
|
|
|
private MyListView customerCareLv;
|
|
|
private ImageView customerCareRefIv;
|
|
|
+ private PullToRefreshScrollView mPullToRefreshScrollView;
|
|
|
|
|
|
private CustomerManagePresenter mCustomerManagePresenter = null;
|
|
|
|
|
|
@@ -104,6 +108,7 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
customerCareRefTimeTv = findViewById(R.id.customerCareRefTimeTv);
|
|
|
customerCareLv = findViewById(R.id.customerCareLv);
|
|
|
customerCareRefIv = findViewById(R.id.customerCareRefIv);
|
|
|
+ mPullToRefreshScrollView = findViewById(R.id.mPullToRefreshScrollView);
|
|
|
|
|
|
addGridView = (MyGridView) findViewById(R.id.addGridView);
|
|
|
|
|
|
@@ -135,6 +140,14 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
customerCareRefIv.setOnClickListener(mOnClickListener);
|
|
|
visitTv.setOnClickListener(mOnClickListener);
|
|
|
visitRefIv.setOnClickListener(mOnClickListener);
|
|
|
+ mPullToRefreshScrollView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
|
|
|
+ mPullToRefreshScrollView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ScrollView>() {
|
|
|
+ @Override
|
|
|
+ public void onRefresh(PullToRefreshBase<ScrollView> refreshView) {
|
|
|
+ mCustomerManagePresenter.loadAllData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
addGridView.setAdapter(new EasyBaseAdapter(ct, getAddItems()) {
|
|
|
@Override
|
|
|
public View bindView(View view, int position, EasyBaseModel model) {
|
|
|
@@ -442,6 +455,7 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
|
|
|
@Override
|
|
|
public void setShowCustomerAdapter(List<EasyBaseModel> models) {
|
|
|
+ mPullToRefreshScrollView.onRefreshComplete();
|
|
|
showCustomerRefIv.setAnimation(null);
|
|
|
showCustomerRefTimeTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
|
|
|
if (showCustomerAdapter == null) {
|
|
|
@@ -491,6 +505,7 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
|
|
|
@Override
|
|
|
public void setForgetCustomerAdapter(List<EasyBaseModel> models) {
|
|
|
+ mPullToRefreshScrollView.onRefreshComplete();
|
|
|
forgetCustomerRefIv.setAnimation(null);
|
|
|
forgetCustomerRefTimeTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
|
|
|
if (mCustomerForgetAdapter == null) {
|
|
|
@@ -503,7 +518,7 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
|
|
|
@Override
|
|
|
public void setCustomerCareAdapter(List<EasyBaseModel> models) {
|
|
|
-
|
|
|
+ mPullToRefreshScrollView.onRefreshComplete();
|
|
|
customerCareRefIv.setAnimation(null);
|
|
|
customerCareRefTimeTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
|
|
|
if (mCustomerCareAdapter == null) {
|
|
|
@@ -516,6 +531,7 @@ public class CustomerManageActivity extends OABaseActivity implements ICustomerM
|
|
|
|
|
|
@Override
|
|
|
public void setVisitAdapter(List<EasyBaseModel> models) {
|
|
|
+ mPullToRefreshScrollView.onRefreshComplete();
|
|
|
visitRefIv.setAnimation(null);
|
|
|
visitRefTimeTv.setText(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
|
|
|
if (mVisitAdapter == null) {
|