title: Android popup with multiple pages
body: <p>I am currently creating a popup window by this code:</p>
  
  <pre><code>View popupView = inflater.inflate(R.layout.popup, null);
  final PopupWindow popupWindow = new PopupWindow(popupView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
  popupWindow.setAnimationStyle(R.style.Animation);
  LinearLayout linearLayout = popupView.findViewById(R.id.linearLayout1);
  linearLayout.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
          popupWindow.dismiss();
          popu = false;
      }
  });
  
  ImageView imageView = popupView.findViewById(R.id.imageView1);
  imageView.setImageResource(drawables[position]);
  popupWindow.showAtLocation(imageView, Gravity.CENTER, 0, 0);
  popu = true;
  </code></pre>
  
  <p>However, I want the popup to have multiple pages, like here:</p>
  
  <p><img src="https://i.stack.imgur.com/jg9SL.png" alt="picture"></p>
  
  <p>How can I implement a multi-paged popup into my app? can I add a <code>ViewPager</code> into my <code>PopupWindow</code> or I need to switch to a <code>Dialog</code> instead?</p>