4

I have an android application uses Alertdialog.I am setting animation for this dialog.I want to start the animation from top left and ends at bottom right.ie,The dialog want to moves from top-left to bottom-right with in the animation duration time.

How can i achieve this?

Asha Soman
  • 302
  • 2
  • 6
  • 18

1 Answers1

9

try this

AlertDialog.Builder alert = new AlertDialog.Builder(this);
        alert.setTitle("Final Result");
        alert.setMessage(msg);
        alert.setPositiveButton("OK",
                new DialogInterface.OnClickListener() {

                    public void onClick(DialogInterface dialog, int which) {
                        // TODO Auto-generated method stub

                    }

                });


        // dlgAlert.create();
        AlertDialog dialog_card = alert.create();
        // dlgAlert.requestWindowFeature(Window.FEATURE_NO_TITLE);
        // WindowManager.LayoutParams WMLP =
        dialog_card.getWindow().setGravity(Gravity.TOP);

        dialog_card.show();`
sumit acharya
  • 619
  • 1
  • 6
  • 18