title: Android PopupWindow Animation not working
body: <p>I am showing PopupWindow on button click from top-left corner of the screen. But the problem is, when I am opening it, it will shown very fast, that means no animation occurs, but when I am closing it, its working fine, that means it is disappearing with animation. </p>
  
  <p>Here is my code, please help me.</p>
  
  <p><strong>Main Class Code</strong>:</p>
  
  <pre><code>    LayoutInflater layoutInflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              View layout = layoutInflater.inflate(R.layout.eosos_maptype_popup, null);
              final TextView txtContacts = (TextView) layout.findViewById(R.id.txtContacts);
              final TextView txtFeatured = (TextView) layout.findViewById(R.id.txtFeatured);
             final PopupWindow popup = new PopupWindow(CalendarView.this);
  
              popup.setAnimationStyle(R.style.animation);
  
  
              popup.setContentView(layout);
              popup.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
              popup.setWidth(WindowManager.LayoutParams.WRAP_CONTENT);
              popup.setFocusable(true);
              popup.setBackgroundDrawable(new BitmapDrawable(getResources()));
  
              // popup.showAtLocation(layout, Gravity.LEFT | Gravity.TOP, rect.left -
              // v.getWidth(), getDeviceHeight() - rect.top);
              popup.showAtLocation(layout, Gravity.TOP | Gravity.LEFT, rect.left, rect.bottom);
  </code></pre>
  
  <p><strong>My style.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;style name="animation" parent="android:Animation"&gt;
          &lt;item name="@android:windowEnterAnimation"&gt;@anim/popup_show&lt;/item&gt;
          &lt;item name="@android:windowExitAnimation"&gt;@anim/popup_hide&lt;/item&gt;
      &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>My popup_show.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;translate android:fromXDelta="-100%" android:toXDelta="0" android:duration="1000"/&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p><strong>My popup_hide.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;translate android:fromXDelta="0" android:toXDelta="-100%" android:duration="1000"/&gt;
  android:duration="200"/&gt; --&gt;
  &lt;/set&gt;
  </code></pre>