public void refresh1() { switch (Common.historyFilter) { case 1: // list.setTextFilterEnabled(true); adapter.getFilter().filter("transit"); break; case 2: // list.setTextFilterEnabled(true); adapter.getFilter().filter("deal"); break; default: // list.setTextFilterEnabled(false); adapter.getFilter().filter(""); break; } // adapter.getFilter().filter("transit"); }
@Override public boolean onContextItemSelected(MenuItem item) { if (item.getItemId() == CONTEXTMENU_TRANSIT) { History it = ((History) adapter.getItems().get(selectedRowId)); adapter.getFilter().filter("." + it.getOrdSerial() + "."); } if (item.getItemId() == CONTEXTMENU_DELETE) { History it = ((History) adapter.getItems().get(selectedRowId)); Common.delOrder(this, it); } return true; }