[android-developers] Re: Problem with AnimationDrawable

2012-12-17 Thread Hassy
Hi, I had the same problem. you can execute a runnable to start your frame animation without using buttons like this Handler startHandler = new Handler(); startHandler.postDelayed(new Runnable(){ public void run() { //animate animate(); }}, 1

[android-developers] Re: Problem with AnimationDrawable

2012-12-17 Thread Hassy
Hi, I had the same problem. you can execute a runnable to start your frame animation like this Handler startHandler = new Handler(); startHandler.postDelayed(new Runnable(){ public void run() { //animate animate(); }}, 100); hope it helps y

[android-developers] Re: Problem with AnimationDrawable

2011-01-03 Thread Serdel
Take a look here where I explained that while asking another question: https://groups.google.com/group/android-developers/browse_thread/thread/9c10ceff77cd7ed3/9d381a5f3d36f0c4?hl=pl&lnk=gst&q=Strange+Problem+with+releasing+bitmaps+and+%27back%27+button+#9d381a5f3d36f0c4 -- You received this mes

[android-developers] Re: Problem with AnimationDrawable

2010-12-26 Thread Joe D.
I am trying to load many frames into a animationDrawable and I'm running into similar problems. Can you post an example of your solution - "manually adding Bitmaps as frames, and then calling recycle() on them". Do you mean you completely bypassed animationDrawable and just displayed the bitm

[android-developers] Re: Problem with AnimationDrawable

2010-11-25 Thread Serdel
Ok it still needs some more testing but it looks like I have solved the problem by creating the animation with manually adding Bitmaps as frames, and then calling recycle() on them. And I can now run the 2 animations with full frame and size. It is a less elegant approach and more 'hard-coded' but

[android-developers] Re: Problem with AnimationDrawable

2010-11-25 Thread Serdel
Ok it still needs some more testing but it looks like I have solved the problem by creating the animation with manually adding Bitmaps as frames, and then calling recycle() on them. And I can now run the 2 animations with full frame and size. It is a less elegant approach and more 'hard-coded' but

[android-developers] Re: Problem with AnimationDrawable

2010-11-24 Thread Serdel
I was able to launch the 2 animation by decreasing the frame number to 4 for each. It works as a single launch but the OutOfMemoryError exception still occurs. The problem is when I want to go back from the last activity to the first one (as I wrote it is a 'ring' app), or when I exit and open the

[android-developers] Re: Problem with AnimationDrawable

2010-11-23 Thread Serdel
Well the draw9patch tool from android sdk had produced files 10 times bigger than the jpg that I used originally. One animation consists of 7 files, each one is 28-40 kb. The 9.png files were starting from 300 kb :> Although it doesn't seem much, and I saw people loading several animation in one a

Re: [android-developers] Re: Problem with AnimationDrawable

2010-11-23 Thread Kumar Bibek
Reduce the size of your drawables. Make them 9patch if you can. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Nov 23, 2010 at 5:24 PM, Serdel wrote: > Ok I have managed to launch the animation at activity startup by > putting it in the onWindowFocusChanged method

[android-developers] Re: Problem with AnimationDrawable

2010-11-23 Thread Serdel
Ok I have managed to launch the animation at activity startup by putting it in the onWindowFocusChanged method. However I am still struggling with the out of memory problems. I tried to use some suggestions people give on the net like analyseAnimation.setCallback(null) oranalyseImage.setBackgroundD

[android-developers] Re: Problem with AnimationDrawable

2010-11-23 Thread Serdel
Thank you for the reply. I really don't get this - following your advice I moved the animation creating code out of OnCreate. Firstly I overrided an 'OnStart()' method of the main activity - nothing. Then I have put it in the OnTick() method of the timer in a simple if condition to launch only at t