Android Alert Modal Popup window using Activity

The following steps will get you a basic set up for a Alert Window, or a Modal or a Popup window which ever you call it, but it’s a screen that shows on top of the previous activity.

۱٫ This is a layout file in the drawable folder, optional but it will make the modal’s corner round. dialog_shape.xml

 

۲٫ Define the layout file for the activity class which will be used for the popup window. Feel free to modify it accordingly to your needs, it’s the same as any other layout file you would define for an Activity. activity_about.xml

 

۳٫ Create the Activity class. AboutActivity.java

 

۴٫ Register the Activity class in the manifest file with the configurations for using the theme Theme.AppCompat.Dialog.Alert to make the activity as a Dialog.

 

4 سال پیش

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

این سایت از اکیسمت برای کاهش هرزنامه استفاده می کند. بیاموزید که چگونه اطلاعات دیدگاه های شما پردازش می‌شوند.