Exemple #1
0
 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   Session s = mAdapter.getItem(position);
   if (s.haveShell()) {
     System.setCurrentSession(s);
     startActivity(new Intent(Sessions.this, Console.class));
     overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);
   } else {
     longClickListener.onItemLongClick(parent, view, position, id);
   }
 }
 @Override
 public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
   if (itemLongClickListener != null)
     return itemLongClickListener.onItemLongClick(parent, view, position, id);
   return false;
 }