J'essaye d'animer une fenêtre popup quand elle est montrée du bas de la vue avec un push_up dans l'animation et quand elle est proche avec une animation push_up out. Mais ne fonctionne pas, le pop-up affiche normalement avec l'animation deafult (très rapide). Voici mon code:L'animation de fenêtre popup ne fonctionne pas
push_up_in.xml
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="1000"
android:fromYDelta="100%p"
android:toYDelta="0" />
<alpha
android:duration="1000"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set>
push_up_out.xml
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="1000"
android:fromYDelta="0"
android:toYDelta="-100%p" />
<alpha
android:duration="1000"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set>
styles.xml
<style name="popup_anim">
<item name="android:windowEnterAnimation">@anim/push_up_in</item>
<item name="android:windowExitAnimation">@anim/push_up_out</item>
</style>
et où la fenêtre est affichée dans le code:
final PopupWindow pw = new PopupWindow(popview, 100, 100, true);
pw.setBackgroundDrawable(new BitmapDrawable());
pw.setOutsideTouchable(true);
pw.setAnimationStyle(R.style.popup_anim);
pw.showAtLocation(this.findViewById(R.id.map_layout),
Gravity.BOTTOM, 0, 0);
View map = (View) findViewById(R.id.map);
int mapwidth = map.getWidth();
int mapheight = map.getHeight();
int popuph = (int) (mapheight * 0.3);
pw.update(mapwidth, popuph);
Toute pensée?