J'ai un Imageview
dans un RelativeLayout
. Il devrait commencer à partir du centre de l'écran (parent) et aller à un point spécifique. Je travaille actuellement avec xml. Des solutions?Traduire Animation en Android - Commence au centre de l'écran
Mon animation XML-
<set xmlns:android="http://schemas.android.com/apk/res/android">
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="false">
<translate
android:fromYDelta="0%p"
android:fromXDelta="0%p"
android:toYDelta="0%"
android:toXDelta="0%"
android:duration="1000"
android:pivotX="0%p"
android:pivotY="0%p"/>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXScale="432px"
android:toXScale="100%"
android:fromYScale="450px"
android:toYScale="100%"
android:duration="1000"
android:pivotX="0%p"
android:pivotY="0%p" />
</set>
Je l'ai essayé dans fromYDelta
et fromXDelta
avec 100%p, 50%p, 0%p, 100, 50, 0, 100%, 50% and 0%
. Rien ne fonctionne! Maintenant, je suis confus! Merci pour votre temps et votre aide
Edit:
A picture to explain what the Animation should do
avez-vous essayé celui-ci https://stackoverflow.com/questions/10276251/how-to-animate-a-view-with-translate-animation-in-android?answertab=votes#tab-top? –
C'est un élément de la bannière, qui est en haut (32dp margeTop) et au centre. mais l'image doit être laissée dans la bannière –
Ouais je l'ai essayé, mais alors je dois trouver un moyen de le remettre dans la bannière –