1. MyProgressBar.java
This class extends the ProgressBar class and has two methods that we would need to call to start and stop the animation.
To start the animation: call startAnimation()
To stop the animation: call dismiss()
Basically, we run a thread which keeps on switching the images. That's it.
2. myprogressbar.xml
This is the layout that the MyProgressBar would be using. This animation would be using 9 images which are in the drawable folder.

You can check out the whole project from the SVN. Here is the link.
https://myandroidwidgets.googlecode.com/svn/trunk/Custom_Progress_Bar
Thanks
ReplyDeletenice app.
ReplyDeletenice one.. tnx :)
ReplyDeleteThread sleep and new thread. WTF.
ReplyDeleteNo good...
Scheduled executor is must.