Android -- Change the AlertDialog Animation?
Posted
by borg17of20
on Stack Overflow
See other posts from Stack Overflow
or by borg17of20
Published on 2010-05-23T23:14:19Z
Indexed on
2010/05/23
23:21 UTC
Read the original article
Hit count: 1043
Hello all,
Does anyone know how to change the in/out animations of an extended AlertDialog? I connot figure out how to do this. See below for what I have so far (it doesn't work though):
public class PauseMenu extends AlertDialog
{
private Context myContext;
public PauseMenu(Context context, int theme) {
super(context, theme);
myContext = context;
}
protected PauseMenu(Context context, boolean cancelable,
OnCancelListener cancelListener) {
super(context, cancelable, cancelListener);
myContext = context;
}
public PauseMenu(Context context) {
super(context);
myContext = context;
}
@Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
//super.onCreate(savedInstanceState);
this.setContentView(R.layout.pause_menu);
//this.getWindow().getDecorView().setAnimation(new ViewZoomAnimation());
this.getWindow().getDecorView().setAnimation(AnimationUtils.loadAnimation(myContext, R.anim.slide_in_bottom_newgame));
}
}
Thanks.
© Stack Overflow or respective owner