I am currently creating a popup window by this 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;
However, I want the popup to have multiple pages, like here:
How can I implement a multi-paged popup into my app? can I add a ViewPager
into my PopupWindow
or I need to switch to a Dialog
instead?