|
|
@@ -350,55 +350,49 @@ public class TaskActivity extends BaseActivity implements OnClickListener,Recogn
|
|
|
private void initSearchEvent() {
|
|
|
edt_search.addTextChangedListener(new TextWatcher() {
|
|
|
@Override
|
|
|
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
|
|
@Override
|
|
|
- public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
|
|
@Override
|
|
|
public void afterTextChanged(Editable editable) {
|
|
|
LogUtil.prinlnLongMsg("real_List", real_List + "");
|
|
|
String strChche = editable.toString().replace(" ", "");//去除空格
|
|
|
+ if (ListUtils.isEmpty(real_List)) {mEmptyLayout.showEmpty(); return;}
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(strChche)){
|
|
|
+ adapter = new NewSchedultAdapter(TaskActivity.this, real_List);
|
|
|
+ listview_main.setAdapter(adapter);
|
|
|
+ if (adapter.getCount() != 0) {
|
|
|
+ sendHomeBroadcast(adapter.getCount());
|
|
|
+ } else {
|
|
|
+ mEmptyLayout.showEmpty();
|
|
|
+ }
|
|
|
+ listview_main.onRefreshComplete();
|
|
|
+ }
|
|
|
strChche = strChche.replace(" ", " ");//去除空格
|
|
|
List<AllProcess> chche = new ArrayList<>();
|
|
|
if (StringUtils.isEmpty(strChche)) return;
|
|
|
|
|
|
- if (ListUtils.isEmpty(real_List)) {
|
|
|
- mEmptyLayout.showEmpty();
|
|
|
- return;
|
|
|
- } else {
|
|
|
- for (int i = 0; i < real_List.size(); i++) {
|
|
|
- boolean b = getResult(real_List.get(i).getRecorder() + real_List.get(i).getDealpersoncode()
|
|
|
- + real_List.get(i).getStatus() + real_List.get(i).getTaskname()
|
|
|
- + real_List.get(i).getEndTime() + real_List.get(i).getDatetime(), strChche.trim());
|
|
|
+ for (int i = 0; i < real_List.size(); i++) {
|
|
|
+ boolean b = getResult(real_List.get(i).getRecorder() + real_List.get(i).getDealpersoncode()
|
|
|
+ + real_List.get(i).getStatus() + real_List.get(i).getTaskname()
|
|
|
+ + real_List.get(i).getEndTime() + real_List.get(i).getDatetime(), strChche.trim());
|
|
|
|
|
|
- if (b){
|
|
|
- chche.add(real_List.get(i));
|
|
|
- }
|
|
|
- if (i == real_List.size() - 1){
|
|
|
- adapter = new NewSchedultAdapter(TaskActivity.this, chche);
|
|
|
- listview_main.setAdapter(adapter);
|
|
|
- if (adapter.getCount() != 0) {
|
|
|
- sendHomeBroadcast(adapter.getCount());
|
|
|
- } else {
|
|
|
- mEmptyLayout.showEmpty();
|
|
|
- }
|
|
|
- listview_main.onRefreshComplete();
|
|
|
+ if (b){
|
|
|
+ chche.add(real_List.get(i));
|
|
|
+ }
|
|
|
+ if (i == real_List.size() - 1){
|
|
|
+ adapter = new NewSchedultAdapter(TaskActivity.this, chche);
|
|
|
+ listview_main.setAdapter(adapter);
|
|
|
+ if (adapter.getCount() != 0) {
|
|
|
+ sendHomeBroadcast(adapter.getCount());
|
|
|
+ } else {
|
|
|
+ mEmptyLayout.showEmpty();
|
|
|
}
|
|
|
+ listview_main.onRefreshComplete();
|
|
|
}
|
|
|
- Log.v("chche",chche+"");
|
|
|
}
|
|
|
-
|
|
|
- if (!StringUtils.isEmpty(strChche)){
|
|
|
- listview_main.getRefreshableView().setAdapter(adapter);
|
|
|
- }else {
|
|
|
- adapter.notifyDataSetInvalidated();
|
|
|
- }
|
|
|
-
|
|
|
+ Log.v("chche",JSON.toJSONString(chche));
|
|
|
}
|
|
|
});
|
|
|
}
|