alLayout.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 //check which item is clicked here and proceed                 if(position==0)                 {                     //do something                 }                 else if(position==0)                 {                     //do something                 }                 else if(position==0)                 {                     //do something                 }                 //and so on to the list end              }         });     }      }  @Override public int getItemCount() {     return 