title: Android: Display images in full screen with caption on `onClick` event
body: <p>I'm a beginner to the android development. I have an android image view that import web image by using Picasso 2.5.2 library. It's working. After click on that imageview, I want to create a full screen Android dialog with that image. I' used following code for it. But after click on the image view, a dialog is displayed without full screen. Finally, I want to zoom in and zoom out that full screen dialog. I want this kind of full screen on imageview <code>onClickListener</code>. Also see how the below image has a title and I also need the image caption (like in Facebook)</p>
  
  <p><a href="https://i.stack.imgur.com/MlL3O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MlL3O.jpg" alt="enter image description here"></a></p>
  
  <p>Here is my code</p>
  
  <p><strong>Mainactivity.java</strong></p>
  
  <pre><code>import android.app.Dialog;
  import android.content.Context;
  import android.content.DialogInterface;
  import android.graphics.Bitmap;
  import android.graphics.drawable.ColorDrawable;
  import android.graphics.drawable.Drawable;
  import android.net.Uri;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.ViewGroup;
  import android.view.Window;
  import android.widget.ImageView;
  import android.widget.RelativeLayout;
  
  import com.squareup.picasso.Picasso;
  
  public class MainActivity extends AppCompatActivity {
  
      ImageView imageView1;
      Context context;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          initUi();
      }
  
      public void initUi(){
          imageView1 = (ImageView)findViewById(R.id.image);
          Picasso.with(this)
                  .load(Uri.parse("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640"))
                  .into(imageView1);
          imageView1.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  showImage();
              }
          });
      }
  
      public void showImage() {
          Dialog builder = new Dialog(this, android.R.style.Theme_Light);
          builder.requestWindowFeature(Window.FEATURE_NO_TITLE);
          builder.getWindow().setBackgroundDrawable(
                  new ColorDrawable(android.graphics.Color.TRANSPARENT));
          builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
              @Override
              public void onDismiss(DialogInterface dialogInterface) {
                  //nothing;
              }
          });
  
          ImageView imageView = new ImageView(this);
          Picasso.with(this)
                  .load(Uri.parse("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640"))
                  .into(imageView);
          builder.addContentView(imageView, new RelativeLayout.LayoutParams(
                  ViewGroup.LayoutParams.WRAP_CONTENT,
                  ViewGroup.LayoutParams.WRAP_CONTENT));
          builder.show();
      }
  }
  </code></pre>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_add_info_other"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      android:orientation="vertical"&gt;
  
      &lt;ScrollView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
  
              &lt;TextView
                  android:text="Image buttons"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="5dp"
                  android:textColor="@android:color/black"
                  android:textSize="16sp"/&gt;
  
              &lt;ImageView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:id="@+id/image"/&gt;
  
  
          &lt;/LinearLayout&gt;
  
      &lt;/ScrollView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>