Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TranslateAnimation d'une textView

Featured Replies

Posté(e)

J'ai commencer un petit projet prompteur pour me lancer dans le dév android, pour voir une idée plus précise du projet:

https://www.frandroid.com/forum/viewtopic.php?pid=67053#p67053

Maintenant mon problème:

J'utilise TranslateAnimation d'une textView pour faire délacer le texte, mais le texte démarre doucement, accélère puis ralenti. Je en comprend pas trop pourquoi. Des idées pour solutionner ce premier problème, ou c'est seulement une illusion d'optique ?

Posté(e)

C'est tout à fait possible !

Quand tu crées ta propre animation, tu indiques dans un fichier Xml ce que ton animation change ( la position passe de 0% à 100% par exemple ), et pour cela tu peux donner un accelerateur, qui explique comment va varier la vitesse de ton animation.

Il suffit que l'accélérateur utilisé par TranslateAnimation soit un accélérateur qui accélére puis ralentit, et hop, c'est fait.

Si ca te gene, tu peux refaire ta propre animation toi meme, et choisir ton propre accélérateur !

Note : j'avais écrit deux articles sur mon blog la dessus ( comment créer son animation, et le role des accélérateurs ) :

http://androidblogger.blogspot.com/2009/01/chaining-two-animations-or-how-to.html

http://androidblogger.blogspot.com/2009/01/to-accelerate-or-to-decelerate.html

Rejoignez la conversation

Vous pouvez poster maintenant et vous enregistrez plus tard. Si vous avez un compte, connectez-vous maintenant pour poster.

Invité
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Répondre à ce sujet…

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.