コード例 #1
0
 @Override
 public void onFocusChange(View view, boolean hasFocus) {
   if (view instanceof SearchView) {
     if (!hasFocus) {
       mAdapter.getFilter().filter(""); // show all rows
     }
   }
 }
コード例 #2
0
 @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 + "");
       }
   }
 }
コード例 #3
0
 @Override
 public boolean onMenuItemActionCollapse(MenuItem item) {
   //
   mAdapter.getFilter().filter(""); // showing all rows
   return true;
 }
コード例 #4
0
 @Override
 public boolean onQueryTextChange(String newText) {
   Log.d(TAG, newText);
   mAdapter.getFilter().filter(TrackedEntityInstanceAdapter.FILTER_SEARCH + newText);
   return true;
 }