Custom Popup Window Example

Custom Popup Window Example

This example shows how you can create and customize a popup window.


1.) Create a new project by File-> New -> Android Project name it CustomPopupWindowExample.
2.) Write following into your main.xml file:




3.) Create and Write following into your popup.xml:




4.) Create anim folder into your res directory, create popup_hide.xml and write following:




5.) Create popup_show.xml into anim folder and write following:




6.) Create button_bar_gradient.xml into drawable folder and write following:




7.) Create button_close.xml into drawable folder and write following:




8.) Create and write following into




9.) Run for output.


1.) Create a project named CustomPopupWindowExample and set the information as stated in the image.

Build Target: Android 2.3.3
Application Name: CustomPopupWindowExample
Package Name: com.example
Activity Name: CustomPopupWindowExample
Min SDK Version: 10

2.) Open file and write following code there:




3.) Compile and build the project.


Comments 7

Leave a Reply

Your email address will not be published. Required fields are marked *