Friday, February 8, 2008

ProgressBar: Android Simple Custom Component


It is interesting that we can create a customized component or in other word, we just say custom component in Android. From the documentation, it is permitted to build a custom component from any class / view class provided by android. Last night, i try to make a custom component, a progressbar component, just like a progress bar in VC++, BC++, or VB.

When browsing sample program ship with android SDK, there are some sample program providing with Android progress bar showing some screen. But it is not make me step backward, just want to know the feelling how can i create a custom component.

This ProgressBar simple custom component has been upload to my googlepages: Google Site you can study from that, and download the code to make your study easier.

On the reason to make you know what i say, just take a look at image below. Two image, one when the application run, and the second after simulate/stop.


First image


Second image



Do you want to learn more ?
Learning with sample code ?
Learning by Doing ?
Just Visit My Google Site
Study Contact Database Application
and there is Android UI Design at there.


7 comments:

Anonymous said...

Hi, ur link does not work. Can you post ur code to customize the progressdialog

Bhayangkara said...

I've Update the link, it because of the moving of site from old googlepages to new Google Site.

Enjoy!

Anonymous said...

I found your post useful. Thanks.

Custom Paper Writing said...

Many institutions limit access to their online information. Making this information available will be an asset to all.

Anonymous said...

GREAT, THX 1000TIMES!

Swetha said...

Basically I'm a android beginner. Your site is helping me a lot.It's really wonderful...Thanks for all the posts.

guyvo said...

Very usefull !
You show the basics on overrides and implementations you have todo when creating your own view.

Just a small remark on your code:

It would be better that you provide a progressbar constructor that can take custom colors instead of hardcoding them now into your class. Maybe decoupling some of the parameters like that via a resource xml file would be more flexible and more in the line of android development.

regards
Guy