title: Bottom Sheet Dialog for RecyclerView Item Click
body: <p>In my <code>recyclerview</code> there are some items which user can add as favorite.
  When user click <code>+</code> icon for that item, i will open <code>Bottom Sheet Dialog</code> with 2 buttons. <code>Yes</code> or <code>No</code>. Once I hit yes, favorite will be saved.</p>
  
  <p>I generally do this for normal clicks, but how can I implement this to RecyclerView Adapter for any click?</p>
  
  <p><strong>Adapter Class</strong></p>
  
  <pre><code> @Override
  public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
      String urlExtension = "http://192.168.1.110/myapp/public/images";
      Glide.with(context).load(urlExtension+itemList.get(position).getList_image()).into(holder.imageView_list_city);
      holder.textView_list_city_name.setText(itemList.get(position).getList_name());
      holder.textView_list_city_desc.setText(itemList.get(position).getList_description());
  
      holder.layout_item_add.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Toast.makeText(context, "add", Toast.LENGTH_SHORT).show();
  
  
          }
      });
  
      holder.layout_item_detail.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Toast.makeText(context, "detail", Toast.LENGTH_SHORT).show();
          }
      });
  
  }
  </code></pre>
  
  <p><strong>Bottom Sheet Class</strong></p>
  
  <pre><code>public class BottomSheetList extends BottomSheetDialogFragment {
  @Nullable
  @Override
  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.bottom_sheet_add, container, false);
      return view;
  }
  }
  </code></pre>