|
@@ -1,18 +1,20 @@
|
|
|
package com.uas.appworks.crm3_0.adapter;
|
|
package com.uas.appworks.crm3_0.adapter;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
-import android.content.Context;
|
|
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.BaseAdapter;
|
|
import android.widget.BaseAdapter;
|
|
|
|
|
+import android.widget.FrameLayout;
|
|
|
import android.widget.ImageView;
|
|
import android.widget.ImageView;
|
|
|
import android.widget.SectionIndexer;
|
|
import android.widget.SectionIndexer;
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
import com.common.data.StringUtil;
|
|
import com.common.data.StringUtil;
|
|
|
import com.common.system.SystemUtil;
|
|
import com.common.system.SystemUtil;
|
|
|
-import com.core.utils.NotifyUtils;
|
|
|
|
|
|
|
+import com.core.app.MyApplication;
|
|
|
|
|
+import com.core.base.BaseActivity;
|
|
|
|
|
+import com.core.utils.ToastUtil;
|
|
|
import com.core.utils.sortlist.BaseSortModel;
|
|
import com.core.utils.sortlist.BaseSortModel;
|
|
|
import com.uas.appworks.R;
|
|
import com.uas.appworks.R;
|
|
|
import com.uas.appworks.crm3_0.model.ContactsBean;
|
|
import com.uas.appworks.crm3_0.model.ContactsBean;
|
|
@@ -29,13 +31,22 @@ import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
|
|
|
|
|
|
|
|
public class ContactSortAdapter extends BaseAdapter implements SectionIndexer, StickyListHeadersAdapter {
|
|
public class ContactSortAdapter extends BaseAdapter implements SectionIndexer, StickyListHeadersAdapter {
|
|
|
|
|
|
|
|
- private Context mContext;
|
|
|
|
|
|
|
+ private BaseActivity mContext;
|
|
|
private List<BaseSortModel<ContactsBean>> mSortFriends;
|
|
private List<BaseSortModel<ContactsBean>> mSortFriends;
|
|
|
private boolean isRefeshed;
|
|
private boolean isRefeshed;
|
|
|
private Map<Integer, String> isLog;
|
|
private Map<Integer, String> isLog;
|
|
|
|
|
+
|
|
|
|
|
+ private FrameLayout frameLayout;
|
|
|
|
|
+
|
|
|
|
|
+ public FrameLayout getFrameLayout() {
|
|
|
|
|
+ return frameLayout;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ public void setFrameLayout(FrameLayout frameLayout) {
|
|
|
|
|
+ this.frameLayout = frameLayout;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- public ContactSortAdapter(Context context, List<BaseSortModel<ContactsBean>> sortFriends) {
|
|
|
|
|
|
|
+ public ContactSortAdapter(BaseActivity context, List<BaseSortModel<ContactsBean>> sortFriends) {
|
|
|
mContext = context;
|
|
mContext = context;
|
|
|
mSortFriends = (sortFriends == null ? new ArrayList<BaseSortModel<ContactsBean>>() : sortFriends);
|
|
mSortFriends = (sortFriends == null ? new ArrayList<BaseSortModel<ContactsBean>>() : sortFriends);
|
|
|
isLog = new HashMap<>();
|
|
isLog = new HashMap<>();
|
|
@@ -122,10 +133,12 @@ public class ContactSortAdapter extends BaseAdapter implements SectionIndexer, S
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- NotifyUtils.ToastMessage(mContext,mContext.getString(com.uas.appworks.R.string.not_format_phone));
|
|
|
|
|
|
|
+ // NotifyUtils.ToastMessage(mContext,mContext.getString(com.uas.appworks.R.string.not_format_phone));
|
|
|
|
|
+ ToastUtil.showToast(MyApplication.getInstance(),mContext.getString(com.uas.appworks.R.string.not_format_phone));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- NotifyUtils.ToastMessage(mContext,mContext.getString(com.uas.appworks.R.string.not_phone));
|
|
|
|
|
|
|
+ ToastUtil.showToast(MyApplication.getInstance(),mContext.getString(com.uas.appworks.R.string.not_phone));
|
|
|
|
|
+ // NotifyUtils.ToastMessage(mContext,mContext.getString(com.uas.appworks.R.string.not_phone));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -141,10 +154,10 @@ public class ContactSortAdapter extends BaseAdapter implements SectionIndexer, S
|
|
|
SystemUtil.phoneAction(mContext, phone);
|
|
SystemUtil.phoneAction(mContext, phone);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- NotifyUtils.ToastMessage(mContext,mContext.getString(com.uas.appworks.R.string.not_format_phone));
|
|
|
|
|
|
|
+ ToastUtil.showToast(MyApplication.getInstance(),MyApplication.getInstance().getString(R.string.not_format_phone));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- NotifyUtils.ToastMessage(mContext,mContext.getString(com.uas.appworks.R.string.not_phone));
|
|
|
|
|
|
|
+ ToastUtil.showToast(MyApplication.getInstance(),MyApplication.getInstance().getString(R.string.not_phone));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|