aspose file tools*
The moose likes Android and the fly likes Animated Bacground Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Animated Bacground" Watch "Animated Bacground" New topic
Author

Animated Bacground

Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Hello, I have started developing my first game for android, I just started from making basic window, UI etc.

My background is created based at tile image.



As you can see this tile is animated :P (gif)

I put it in my main.xml



and this is content of my backrepeat.xml file:



And background created automatically from tiles works, but animation doesn't work.



So my conclusion is quite simple (but no idea if its correct) animation wont work with gif file (?)

So i have an idea. There is program which may split GIF file at server external images (break animated gif to frames and add each frame)

And then change background with new frame each few miliseconds, but no idea how to change it after delay.

Can someone help me? Thanks!
Johan Pelgrim
Ranch Hand

Joined: Jul 07, 2003
Posts: 105

Hi Mathew,

Once you have split up your animated GIF into separate images try using the animation-list (frame animation) for animating your background...

Good luck!

Johan


Johan Pelgrim, The Netherlands
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 103

Thank you, I will try it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Animated Bacground