==================== Problem Description ====================
How to animate dialog in Android I only found Dialog.getwindow (). setwindowanimation (int resID);
Isn't this the only way to define animations in styles with XML?
But now I want to use the program to calculate a point on the screen, and let dialog start executing scaleanimation from that point.
How do I set parameters such as the starting point for my dialog animation?
==================== Solution 1====================
Customizing a Dialog
public class Customdialog extends Dialog {public Customdialog (context context) {windowmanager.layoutparams par A = GetWindow (). GetAttributes ();p ara.x = 0; Set start point para.y = 0;para.width = Windowmanager.layoutparams.match_parent;para.windowanimations = Android. r.style.animation;para.gravity = Gravity.top | Gravity.left; }}
Give it a try
How to animate dialog settings in Android How to customize modify parameters