How to create Pop-Up Dialog Animation in App | Android App Development | Java
In this post, you will learn how to create Pop-Up animation for Dialog Box in your Android Application. A dialog is a small window that prompts the user to make decision or enter additional information. A dialog is normally used for modal events that require users to take an action before they can proceed. Implementation: First, create a new Android Resource Directory of type 'anim'. In it create two anim files 'scale_up.xml' and 'scale_down.xml'. These files will contain the code for our dialog animation. In the scale_up.xml file, add the following code: And in the scale_down.xml file, add the following code: Create a new style and add these two xml files to it. Now add a button in the activity_main.xml file which will instantiate the pop-up dialog. Now create a new layout file which will contain the design layout of the dialog box .Add the following code to it. Finally, in the MainActivity.java class, setup the dialog box like so... Output :