title: How can I listen to click events in RecyclerView's ItemTouchHelper?
body: <p>Anyone can teach me how I can add action event when user tap "Edit" icon on ChildDraw in ItemTouchHelper?</p>
  
  <p>Currently, when user swipe item, it's display background color and icon.
  I want to add action when user swipe RIGHT direction and tap "R.drawable.ic_vector_edit" image. </p>
  
  <p>Is there anyway i can add event on that?...</p>
  
  <pre><code>        ItemTouchHelper helper = new ItemTouchHelper(
              new ItemTouchHelper.SimpleCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
                  @Override
                  public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
                      final int fromPos = viewHolder.getAdapterPosition();
                      final int toPos = target.getAdapterPosition();
                      adapter.notifyItemMoved(fromPos, toPos);
  
                      return true;
                  }
  
                  @Override
                  public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
  
                      // RIGHT to LEFT :: delete item
                      if (direction == ItemTouchHelper.LEFT) {
                          final int fromPos = viewHolder.getAdapterPosition();
                          Item myItem = adapter.getItemAtPosition(fromPos);
  
                          // delete the item
                          mItemViewModel.deleteItem(myItem);
                      }
                  }
  
                  @Override
                  public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
  
                      float mdX = dX;
                      Bitmap bitmap;
  
                      if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {
                          // Get RecyclerView item from the ViewHolder
                          View itemView = viewHolder.itemView;
                          Paint p = new Paint();
                          float width = itemView.getHeight() / 5;
  
                          // LEFT to RIGHT :: edit item
                          if (dX &gt; 0) {
                              mdX = dX / 5;
                              /* Set color for positive displacement */
                              int color = ContextCompat.getColor(getContext(), R.color.colorDarKGreen);
                              p.setColor(color);
  
                              // Draw Rect with varying right side, equal to displacement dX
                              c.drawRect((float) itemView.getLeft(), (float) itemView.getTop(), mdX,
                                      (float) itemView.getBottom(), p);
  
                              bitmap = ResourceUtil.getBitmap(getContext(), R.drawable.ic_vector_edit);
                              float height = (itemView.getHeight() / 2) - (bitmap.getHeight() / 2);
  
                              c.drawBitmap(bitmap, (float) itemView.getLeft() + width, (float) itemView.getTop() + height, p);
                          } else { // RIGHT to LEFT :: delete item
                              /* Set color for negative displacement */
                              int color = ContextCompat.getColor(getContext(), R.color.colorDarkRed);
                              p.setColor(color);
  
                              // Draw Rect with varying left side, equal to the item's right side plus negative displacement dX
                              c.drawRect((float) itemView.getRight() + dX, (float) itemView.getTop(),
                                      (float) itemView.getRight(), (float) itemView.getBottom(), p);
  
                              bitmap = ResourceUtil.getBitmap(getContext(), R.drawable.ic_vector_delete);
                              float height = (itemView.getHeight() / 2) - (bitmap.getHeight() / 2);
  
                              c.drawBitmap(bitmap, (float) itemView.getRight() - (bitmap.getWidth() + width), (float) itemView.getTop() + height, p);
                          }
                          super.onChildDraw(c, recyclerView, viewHolder,  mdX, dY, actionState, isCurrentlyActive);
                      }
                  }
              });
  </code></pre>