 <p>You problem is explained in the logcat :</p> <pre><code>android.widget.ImageView cannot be cast to android.widget.TextView </code></pre> <p>And by looking at the next line of your Logcat you can see where it happened:</p> <pre><code>at com.nando.gridview.Dialog.onCreate(Dialog.java:21) </code></pre> <p>So change the following:</p> <pre><code>TextView DialogText=(TextView) findViewById(R.id.imageViewDialog); </code></pre> <p>Into this:</p> <pre><code>TextView DialogText=(TextView) findViewById(R.id.idofyourtextview); </code></pre>