Ejemplo n.º 1
0
 @Override
 public boolean handlesBackKey() {
   if (mActvSearch.getVisibility() == View.VISIBLE) {
     hideSearch();
     return true;
   } else {
     return false;
   }
 }
Ejemplo n.º 2
0
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   if (item.getItemId() == R.id.action_search) {
     if (mActvSearch.getVisibility() == View.VISIBLE) {
       hideSearch();
     } else {
       showSearch();
     }
     return true;
   } else if (item.getItemId() == R.id.action_sync) {
     DBRemote.getInstance().startFullSyncThread();
     return true;
   } else if (item.getItemId() == R.id.action_all_off) {
     Intent i = new Intent(getActivity(), ActivityAllOff.class);
     startActivity(i);
   }
   return false;
 }