title: pass values from RecyclerView to view it in activity
body: <p>I need to pass data from <code>RecyclerView</code> to <code>GalleryActivity</code> class to view image and 2 texts by clicking on <code>RecyclerView</code>. I followed <a href="https://androidjson.com/android-json-parsing-recyclerview-image-text/" rel="nofollow noreferrer">this tutorial</a>. It is warking good but I want to open image and text in another activity. Can someone help?</p>
  
  <pre><code>@Override
  public boolean onInterceptTouchEvent(RecyclerView Recyclerview, MotionEvent motionEvent) {
          view = Recyclerview.findChildViewUnder(motionEvent.getX(), motionEvent.getY());
          if(view != null &amp;&amp; gestureDetector.onTouchEvent(motionEvent)) {
              //Getting RecyclerView Clicked Item value.
              RecyclerViewItemPosition = Recyclerview.getChildAdapterPosition(view);
              Intent intent=new Intent(MainActivity.this,GalleryActivity.class);
              Bundle bundle=new Bundle();
              bundle.putString("title",title);
              bundle.putString("url",url);
              intent.putExtras(bundle);
              startActivity(intent);
          }
          return false;
      }
      @Override
      public void onTouchEvent(RecyclerView Recyclerview, MotionEvent motionEvent) {
      }
      @Override
      public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
      }
  });
  </code></pre>
  
  <p>And the <code>GalleryActivity</code> class</p>
  
  <pre><code>public class GalleryActivity extends AppCompatActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_gallery);
          String title = getIntent().getStringExtra("title");
          setTitle(title);
          TextView desc = (TextView) findViewById(R.id.image_description);
          desc.setText(title);
      }
  }
  </code></pre>
  
  <p>activity_gallery:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:weightSum="100"&gt;
  
      &lt;ImageView
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="70"
          android:id="@+id/image"
          android:scaleType="centerCrop"
          android:src="@mipmap/ic_launcher"/&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/image_description"
          android:layout_marginLeft="10dp"
          android:layout_marginTop="20dp"
          android:text="Canada"
          android:textSize="20sp"
          android:textColor="#000"
          /&gt;
  
  &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>