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
18
votes
6 answers

How to animate .gif images in an android?

Here is the code for xml: Here the minepic is a gif animated image but after running…
Danny
  • 1,050
  • 3
  • 11
  • 26
13
votes
1 answer

dont stop the animation in listview

i'm working with AnimationDrawable for download progressBar i put the animation in getview an it's working fine. but when i'm scrolling the list the animation has been stoped. is there any method in AnimationDrawable to fix this. like setCancelable…
hamedjj
  • 658
  • 6
  • 20
11
votes
6 answers

Android: AnimationDrawable cast error

I was following the Google provided example of how to use AnimationDrawable with an ImageView. You can find it here:…
TheOneX
  • 201
  • 1
  • 2
  • 7
9
votes
2 answers

Android - releasing allocated memory AnimationDrawable is using up

I have a complex Battle system which has 1 parent Activity and then several child classes which access the static variables of the BattleActivity by extending Battle and passing the context to those classes. This all seems to be working fine,…
8
votes
1 answer

What is the difference between clearAnimation() and stop() in android?

When I finishing my activity, should I use clearAnimation() or stop() on any remaining AnimationDrawable objects?
Ranjit
  • 209
  • 5
  • 12
8
votes
2 answers

How do I pause frame animation using AnimationDrawable?

How do I pause frame animation using AnimationDrawable?
akc
  • 582
  • 2
  • 6
  • 23
7
votes
3 answers

RotateDrawable Programmatically in android

How can i give fromFegrees , toDegrees and android:color="#000000" programmatically?
Sanket Kachhela
  • 10,861
  • 8
  • 50
  • 75
5
votes
1 answer

Android. Yor own progress-bar?

4th hour of searching and No results all the same. A fact that we should not. Tell me how to implement the following: There AsyncTask that performs certain actions There are 25 pictures of the following form: Image There Sheet Animation xml: …
5
votes
1 answer

Create animation by changing image in ImageView with Timer (or Handler)

I want to create an simple animation by changing frames inside an ImageView. I don't want to use AnimationDrawable because i need to receive events when a frame changed or when the animation stoped, to be able to play it backwards, restart it and so…
5
votes
4 answers

Removing the background of a frame animation in Android

How can I remove the background of a frame animation (or set it to be transparent)? When I set the background colour in the xml layout file to be transparent, it turns up black when running it. When I setBackgroundColor(0); in the Java code I get…
5
votes
1 answer

Free memory from AnimationDrawable

I'm using animationdrawables in many activities of my app. This is the code to inicializate them: public void prepareVideo (int resourceBall, String animation, int width, int height ){ imgBall = (ImageView)findViewById(resourceBall); …
Joterito
  • 153
  • 2
  • 15
4
votes
0 answers

Animated splash-screen android in xml-format (layer-list)

Is it possible to make an animated splash-screen when just using a drawable xml-file (with layer-list) and call this from android Manifest file: android:theme="@style/AppTheme.Launcher"> /style
java
  • 1,165
  • 1
  • 25
  • 50
3
votes
0 answers

Change color of circularProgressDrawable

I have the following code and I want to change the default color of circularProgressDrawable, in Kotlin. val circularProgressDrawable = CircularProgressDrawable(this).apply { strokeWidth = 10f centerRadius = 50f }
3
votes
2 answers

Pause AnimationDrawable and resume from the same frame

I am trying to animate a set of images using AnimationDrawable. The user should have the ability to pause/resume the animation on a click of a button. I am doing so, using setVisible(boolean visible, boolean restart). Not completely sure if I…
Idan
  • 5,405
  • 7
  • 35
  • 52
3
votes
1 answer

OutOfMemoryError when trying to load multiple frame-by-frame animations one after the other in Android

I have a couple of frame-by-frame animations (animation-list). Loading any one of them to an ImageView is not a problem. The problem occurs when I try to load a different animation in the same ImageView. private void startAnimation(int anim) { …
Kidus
  • 1,785
  • 2
  • 20
  • 36
1
2 3
10 11