popupView Close using a button

Hi,

I have a new layout to be shown as a popup to the user when the user clicks on a button. But I am not sure how to close the popup using a close button.
I cannot use a window in my application, so i need some suggestion to add a close button to the right top of the popupView, and close the popup only when the user clicks on this close button.

Thanks in adavnce.