I can set animation do dialog using xml like following
Dialog myDialog;
myDialog.getWindow().setWindowAnimations(R.style.Animations_sample);
How can I add programmatically created animation to Dialog?
What I mean is I created a animation like following
AnimationSet animationSet = new AnimationSet(true);
TranslateAnimation a = new TranslateAnimation(
Animation.ABSOLUTE,200, Animation.ABSOLUTE,200,
Animation.ABSOLUTE,200, Animation.ABSOLUTE,200);
a.setDuration(1000);
animationSet.addAnimation(a);
how can I set animationSet
to myDialog
?
Thanks in adv.
According to google:
windowAnimations
A style resource defining the animations to use for this window. This must be a system resource; it can not be an application resource because the window manager does not have access to applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With