How to animate view inside popupwindow before dismissing popup window in android?
<p>I want to animate the view inside the popup window before dismissing it. So i have animated the view inside the dismiss listener like below,</p>

<pre><code>penPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
            @Override
            public void onDismiss() {

                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        TranslateAnimation animateSlideUp = new TranslateAnimation(0,0,0, mImageViewLike.getHeight());
                        animateSlideUp.setDuration(200);
                        animateSlideUp.setFillAfter(true);
                        mImageViewLike.startAnimation(animateSlideUp);
                        mImageViewLike.setVisibility(View.VISIBLE);
                    }
                }, 200);

            }
        });
</code></pre>

<p>But this will not animate the imageview inside the popup window before closing the popup window and setOnDismissListener not called before closing the popup window. Could you please suggest me an idea to do any action before closing the popupwindow? Thanks in advance.</p>