How can I close a popup window in android studio : I have an activity which starts a popup window when a button is clicked. I have create a PopupWindow activity and also the appropriate resource xml file. I added a button to the xml file (close popup) button. and I don't know what code should I use for closing the popup window. here's my PopupWindow class

    public class AuthorsPopup extends Activity {
        public Button closePopupButton;
    
        @Override
        public void onCreate(Bundle savedInstanceSlate) {
            super.onCreate(savedInstanceSlate);
            setContentView(R.layout.authors_popup);
    
            DisplayMetrics dm = new DisplayMetrics();
            getWindowManager().getDefaultDisplay().getMetrics(dm);
    
            int width = dm.widthPixels;
            int height = dm.heightPixels;
            //multiply times 0.8 of screen size
            getWindow().setLayout((int) (width * 0.8), (int) (height * 0.8));
    
            closePopupButton = (Button) findViewById(R.id.close_button);
            closePopupButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View popupView) {
                    
                }
            });
    
        }
    }