@Override public void onFocusChange(View view, boolean hasFocus) { if (view instanceof SearchView) { if (!hasFocus) { mAdapter.getFilter().filter(""); // show all rows } } }
@Subscribe public void onItemClick(OnTrackedEntityColumnClick eventClick) { Log.d(TAG, "COLUMN CLICKED : " + eventClick.getColumnClicked()); switch (eventClick.getColumnClicked()) { case OnTrackedEntityColumnClick.FIRST_COLUMN: { } case OnTrackedEntityColumnClick.SECOND_COLUMN: { } case OnTrackedEntityColumnClick.THIRD_COLUMN: { } case OnTrackedEntityColumnClick.STATUS_COLUMN: { mAdapter.getFilter().filter(TrackedEntityInstanceAdapter.FILTER_STATUS + ""); } } }
@Override public boolean onMenuItemActionCollapse(MenuItem item) { // mAdapter.getFilter().filter(""); // showing all rows return true; }
@Override public boolean onQueryTextChange(String newText) { Log.d(TAG, newText); mAdapter.getFilter().filter(TrackedEntityInstanceAdapter.FILTER_SEARCH + newText); return true; }