title: how to get a card position in RecyclerView.Adapter?
body: <p>Please help me with a problem. The problem is that I need to get the card position to convey this position to another Activity. I need to transfer this position when I pressed the button on the card. How to get the card position?</p>
  
  <p><strong>RVAdapter.java</strong></p>
  
  <pre><code>public class RVAdapter extends RecyclerView.Adapter&lt;RVAdapter.PersonViewHolder&gt; {
  
      private final static String myLog = "myLog";
  
  
      List&lt;ItemsOfRow&gt; items;
      private Context context;
  
  
      RVAdapter(List&lt;ItemsOfRow&gt; items, Context context) {
          this.items = items;
          this.context = context;
      }
  
      @Override
      public int getItemCount() {
          return items.size();
      }
  
      @Override
      public PersonViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
          View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.card_view, viewGroup, false);
          PersonViewHolder pvh = new PersonViewHolder(v);
          return pvh;
      }
  
      @Override
      public void onBindViewHolder(PersonViewHolder personViewHolder, int i) {
  
  
          personViewHolder.imgGroupImage.setImageBitmap(items.get(i).getTitleImage());
          personViewHolder.txtTitleGroup.setText(items.get(i).getTitleName());
          personViewHolder.txtContentGroup.setText(items.get(i).getTitleContent());
  
  
          personViewHolder.btnShare.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent sendIntent = new Intent();
                  sendIntent.setAction(Intent.ACTION_SEND);
                  sendIntent.putExtra(Intent.EXTRA_TEXT, items.get(????).getTitleContent());
                  sendIntent.setType("text/plain");
                  context.startActivity(sendIntent);
              }
          });
  
          personViewHolder.btnLearnMore.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent intent = new Intent(context, QuoteActivity.class);
                  intent.putExtra("title",items.get(?????).getTitleName());
                  intent.putExtra("positionGroup", ?????? + "");
                  view.getContext().startActivity(intent);
              }
          });
  
      }
  
      @Override
      public void onAttachedToRecyclerView(RecyclerView recyclerView) {
          super.onAttachedToRecyclerView(recyclerView);
      }
  
      public static class PersonViewHolder extends RecyclerView.ViewHolder{
  
          CardView cv;
  
          TextView txtTitleGroup;
          TextView txtContentGroup;
  
          ImageView imgGroupImage;
  
          Button btnShare;
          Button btnLearnMore;
  
  
          PersonViewHolder(final View itemView) {
              super(itemView);
  
  
  
              cv = (CardView) itemView.findViewById(R.id.cv);
  
              imgGroupImage = (ImageView) itemView.findViewById(R.id.img_group_image);
              txtTitleGroup = (TextView) itemView.findViewById(R.id.txt_title_group);
              txtContentGroup = (TextView) itemView.findViewById(R.id.txt_content_group);
  
  
              btnShare = (Button) itemView.findViewById(R.id.btn_share_group);
              btnLearnMore = (Button) itemView.findViewById(R.id.btn_learn_more);
  
  
          }
      }
  }
  </code></pre>