private void initListView(List<CuzyTBKItem> cuzyTBKItems) { if (adapter == null) { adapter = new StarAdapter(MyApplication.getContext(), cuzyTBKItems); xListView.setAdapter(adapter); } else { adapter.setCuzyTBKItems(cuzyTBKItems); } }
private void loadData(final Handler handler, int page) { CuzyNetCenter.newInstance(MyApplication.getContext()) .fetchRawItems( "", keyword, 0, new Response.Listener() { @Override public void onResponse(Object response) { Message message = new Message(); message.obj = response; message.what = 0; handler.sendMessage(message); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) {} }); }