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.

View/SurfaceView avec Animationdrawable

Featured Replies

Posté(e)

Voila Je regarde actuellement tout se qui est peinture sur view :)

Mon probléme se pose lorsque je m'attaque à l'Animationdrawable : seul la première image est "draw"

Le code ci dessous n'est pas a moi mais c'est la version la plus simple de mon problème je pense !

Je sais que sa marche en Background d'une imageview mais mon but est de passer par des drawables multiple sur une même vue (projet de miniclip à la happy tree friend :P )

Certain forum english parlais d'un override de verifyDrawing(Drawable who) ou un truc du genre mais j'ai essayer sans succées.

Donc en résumé comment on met un Animationdrawable dans une view entourer d'autre petit drawble

public class AnimationTest extends Activity {

AnimationDrawable animation; /**Called when the activity is first created. */

@Override public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

animation = new AnimationDrawable();

animation.addFrame(getResources().getDrawable(R.drawable.ball1), 1000); animation.addFrame(getResources().getDrawable(R.drawable.ball2), 1000); animation.addFrame(getResources().getDrawable(R.drawable.ball3), 1000);

animation.setOneShot(false);

imageAnim.post(new Starter()); }

@override

public void onDraw(Canevas c) {

animation.draw©;

}

class Starter implements Runnable { public void run() { animation.start(); } }

}

the main.xml file is: Code:

<?xml version="1.0" encoding="utf-8"?>

Par avance merci.

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

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.