title: how to pass data between fragments from recyclerview adapter
body: <p>I have two <code>fragments</code> and the first fragment has a <code>recyclerview adapter</code> were i want to pass adapter position to another fragment on <code>clicking</code> the <code>recycler view</code>..</p>
  
  <p><strong>Fragment 1</strong> code from <code>recyclerview adapter</code>:</p>
  
  <pre><code>holder.address.setOnClickListener(new View.OnClickListener() {
                          @Override
                          public void onClick(View v) {
                              Log.i("Position of items...///", String.valueOf(position));
                              //For sending data between fragments
  
                              Bundle bundle = new Bundle();
                              bundle.putInt("Position", position);
                              StoreDetails storeDetails = new StoreDetails();
                              storeDetails.setArguments(bundle);
                              getActivity().getSupportFragmentManager()
                                      .beginTransaction()
                                      .replace(R.id.content_frame, new StoreDetails())
                                      .commit();
  
                          }
                      });
  </code></pre>
  
  <p><strong>Fragment 2 code:</strong></p>
  
  <pre><code>Bundle b = getArguments();
      if(b != null)
      {
          b.getInt("Position");
      }
      else
      {
          Toast.makeText(getActivity(), "Oops sorry..!!", Toast.LENGTH_SHORT).show();
      }
  </code></pre>