|
|
@@ -269,7 +269,6 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
public void onPullUpToRefresh(
|
|
|
PullToRefreshBase<ListView> refreshView) {
|
|
|
cur++;
|
|
|
-// rBar.setVisibility(View.VISIBLE);
|
|
|
String where = CommonUtil.getSharedPreferences(
|
|
|
FormListSelectActivity.this, "where");
|
|
|
String condition = CommonUtil.getSharedPreferences(
|
|
|
@@ -301,9 +300,6 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
new Thread(new GetSaleData(String.valueOf(cur), "10", where))
|
|
|
.start();
|
|
|
}
|
|
|
-// if (!StringUtil.isEmpty(etSearch.toString())) {
|
|
|
-// etSearch.setText("");
|
|
|
-// }
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -334,11 +330,8 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
} else {
|
|
|
mlistview.setMode(PullToRefreshBase.Mode.BOTH);
|
|
|
initData();
|
|
|
-// adapter.getFilter().filter("");
|
|
|
-// adapter.notifyDataSetChanged();
|
|
|
}
|
|
|
}
|
|
|
- // mlistview.setAdapter(adapter);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -576,12 +569,11 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
params.put("sessionId", sessionId);
|
|
|
String result = null;
|
|
|
try {
|
|
|
- result = client.sendPostRequest(CommonUtil.getAppBaseUrl(this)
|
|
|
- + "mobile/common/list.action", params);
|
|
|
+ result = client.sendPostRequest(CommonUtil.getAppBaseUrl(this) + "mobile/common/list.action", params);
|
|
|
LogUtil.prinlnLongMsg("flsparams,flsresult", JSON.toJSONString(params) + ":" + result);
|
|
|
if (result != null && rMap != null) {
|
|
|
- //这里报销单相同参数第一次请求正常,下啦刷新报错不知道原因,只能这么处理
|
|
|
if (result.contains("exceptionInfo")) {
|
|
|
+ //这里报销单相同参数第一次请求正常,下啦刷新报错不知道原因,只能这么处理
|
|
|
handler.sendEmptyMessage(1);
|
|
|
mlistview.onRefreshComplete();
|
|
|
return;
|
|
|
@@ -616,10 +608,7 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * @注释:适配器
|
|
|
- */
|
|
|
+
|
|
|
public class SaleAdapter extends BaseAdapter implements Filterable {
|
|
|
|
|
|
private Context ct;
|
|
|
@@ -632,7 +621,6 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
this.inflater = LayoutInflater.from(ct);
|
|
|
this.data = data;
|
|
|
this.dMap = data;
|
|
|
-// Log.d("SaleAdapter:", data.toString());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -679,10 +667,8 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
dmap = (Map<String, Object>) dList.get(position);
|
|
|
|
|
|
if (convertView == null) {
|
|
|
- convertView = inflater.inflate(R.layout.act_sale_find_item,
|
|
|
- null);
|
|
|
- LinearLayout ly = (LinearLayout) convertView
|
|
|
- .findViewById(R.id.ly_sale_view);
|
|
|
+ convertView = inflater.inflate(R.layout.act_sale_find_item, null);
|
|
|
+ LinearLayout ly = (LinearLayout) convertView.findViewById(R.id.ly_sale_view);
|
|
|
int showIndex = 0;
|
|
|
|
|
|
if (!data.isEmpty()) {
|
|
|
@@ -863,22 +849,18 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
|
|
|
protected void publishResults(CharSequence constraint,
|
|
|
FilterResults results) {
|
|
|
data = (Map<String, Object>) results.values;
|
|
|
- LogUtil.d("遍历过后的数据:" + JSON.toJSONString(data));
|
|
|
rMap = data;//传递数据源
|
|
|
- if (adapter.getCount() == 0) {
|
|
|
- mEmptyLayout.showEmpty();
|
|
|
- }
|
|
|
+ LogUtil.d("遍历过后的数据:" + JSON.toJSONString(data));
|
|
|
if (!StringUtil.isEmpty(constraint.toString())) {
|
|
|
//这里为什么这样做,主要是由于item是动态创建的,查询的数据的item高度大于其它item高度时,
|
|
|
//会发生错位问题,重新设置adaper就没有问题
|
|
|
- // Lg.d("listview 重置适配器");
|
|
|
- mlistview.setAdapter(adapter);
|
|
|
+ mlistview.setAdapter(adapter);
|
|
|
} else {
|
|
|
adapter.notifyDataSetInvalidated();
|
|
|
- LogUtil.d("本地查询刷新。。。");
|
|
|
- //mlistview.getRefreshableView().setSelection(0);
|
|
|
}
|
|
|
-
|
|
|
+ if (adapter.getCount() == 0) {
|
|
|
+ mEmptyLayout.showEmpty();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
};
|