Questions tagged [animationdrawable]

An object used to create frame-by-frame animations in Android. Generally defined as an XML file, placed in the res/drawable/ folder.

An object used to create frame-by-frame animations in Android. Generally defined as an XML file, placed in the res/drawable/ folder. Reference: https://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html

153 questions
0
votes
1 answer

Does android AnimationDrawable has any quick import tool?

I want to create a Animation Drawable just like this example from google,
0
votes
1 answer

How to call a different drawable animation for each click in one imageview?

i have 10 image files. I want to play my pictures in sequential order every time I click imageview like 1-2,2-3,3-4....1-2,2-3...but when I click on imageview, only the first xml file is working.Please help me …
Ugur Gul
  • 53
  • 9
0
votes
2 answers

My AnimationDrawable object's run method slows down my application, any solutions?

I am writing a basic Android app. I did create an AnimationDrawable object to display my multiple images in my layout and set it. After that, my application started to slow down. And i even tried to work that code block on new thread but it didn't…
Yekta Sarıoğlu
  • 1,435
  • 2
  • 12
  • 20
0
votes
0 answers

Element item is not allowed here (animation-list)?

I'm using Android Studio 3.1.3. I was trying to build a splash screen using animation-list. I have some .png images in my res/drawable folder and I have this current .xml file in the same folder. But it is showing this message: Element item is not…
0
votes
1 answer

Show array of URI as GIF Android using AnimationDrawble

So I basically have a List of URIs, each has a .jpeg file, and I want to show this list like a GIF file (not necessesary to make a gif, only to display). So after a research I found the AnimationDrawble object, converted each URI into Drawable and…
Shaxib
  • 43
  • 2
  • 7
0
votes
0 answers

Background animation stutters when I press a button

I am building a mobile app on android studio using Java. I am using animation drawable to create a background animation on an image view. I have a button on the same activity that when pressed makes a window pop up. Once the button is pressed the…
0
votes
0 answers

Determining finish for oneshot and non-oneshot AnimationDrawables

I'm trying to find a solution for switching between AnimationDrawables smoothly. To do this, I feel it's necessary to know when the AnimationDrawable is finished animating. I've seen other stack overflow solutions, but I have not found one that…
isuPatches
  • 6,384
  • 2
  • 22
  • 30
0
votes
0 answers

how to recycle images as frame of AnimationDrawable and solve OutOfMemory error in android?

I want to show some exercises in my android app with ViewPager. i use: 2 imageView ,one of them shows exercises and others shows th counter AnimationDrawable as i eun my app,it has been crashed and shows me OutOFMemory error.although android shows…
Mina Dahesh
  • 332
  • 8
  • 21
0
votes
1 answer

Quick way to add hundreds of items to an XML element

I have to add up to 100 .png's to create an AnimationDrawable on Android. Luckily, the png's are named in ascending order (p1, p2, p3, p4). Manually adding all pngs into the XML element is painfully slow, so I'm wondering if there's a way to…
0
votes
3 answers

Do something when text to speech is over

I need to start a drawable animation when my text to speech is starting and stop this one when the text to speech is over, but i can't stop the animation. Code: tts = new TextToSpeech(this, new TextToSpeech.OnInitListener() { @Override …
0
votes
1 answer

AnimationDrawable not showing when used with an AsyncTask

I'm trying to show an animation with AnimationDrawable in my Activity which works fine when i'm not using an AsyncTask with a callback interface.My code for the animation is, img =…
tasgr86
  • 299
  • 2
  • 7
  • 17
0
votes
3 answers

Frame Animations only start one time

I have created a frame animations by the code below. I want every time I click at the button the animation will start but it only work at first time.
Linh
  • 57,942
  • 23
  • 262
  • 279
0
votes
2 answers

AnimationDrawable OutOfMemoryError

Current Version: Android Studio 2.2.3 I will start by asking, how do you create an animation-list? When you click on the res/drawable folder new -> Drawable resource file you don't have the option to change the Root Element from selector to…
0
votes
1 answer

How to change between sprite action animations seamlessly without running into OOM?

I have sprite animations such as run, sleep, walk, jump, ect. Each of these animations work by themselves, but I run into memory issues when I attempt to change animations with setBackgroundResource() to a different set of animationa while the…
portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136
0
votes
0 answers

Creating an AnimationDrawable with images from SDcard file path

I need to create an AnimationDrawable with images on the device SDcard, I have attempted to do so by creating a drawable from path however despite successfully creating a Drawable the addFrame() method of the AnimationDrawable rejects it anyway, is…