I hava a popup window in my application, its appears when some button clicked I want to set fade in animation to this window, I put the xml file in \"res/anim\" folder and s
I think the problem is you have provided only one set of animation style. But actually a PopupWindow
requires two animations. One will be used by it when window is shown and other one to hide the window.
This is how you should do it,
1) Create Two Different set of animations.
say, popup_show.xml and popup_hide.xml and add it to your anim folder which you have to create inside res folder.
2) Now inside values folder create a xml called styles.xml and add these animations to it like this,
3) Now set this style to your PopupWindow
animation,
popup.setAnimationStyle(R.style.Animation);
Now it automatically detects window enter and exit and provides with the required animation.