I am using android 1.0 sdk and I am not getting progress.setMessage
API.
Can I get any work around?
BREW implements decorator design pattern which helps in getting the
two widget functionality into one.
some text on a progress bar, that's all I need.

On Mar 21, 4:18 pm, T patel <trushs...@gmail.com> wrote:
> On Mar 10, 9:17 pm, David Yue <a52...@motorola.com> wrote:
>
>
>
> > Hi,
> > I am trying to implement a ProgressBar with text over it. Below is my
> > general idea:
>
> > In layout *.xml file, I define it as below:
> > <ProgressBar android:id="@+id/progress_ID"
> >         style="?android:attr/progressBarStyleHorizontal"
> >         android:layout_width="200dip"
> >         android:layout_height="wrap_content"
> >         android:max="100"
> >         android:progress="50" />
>
> > In Java code, I do like this:
> > final ProgressBar progress;
> > progress = (ProgressBar) v.findViewById(R.id.progress_ID);
> > progress.setProgress(99);
>
> > BUT I have no idea how to display a text like "50%" over the
> > ProgressBar. I gone through progress realted mehtods, not found useful
> > refrence. Do you have any idea? or I must use another way?
> > thanks a lot!
>
> > BR,
> > David
>
> try this code
>
> progress = (ProgressBar) v.findViewById(R.id.progress_ID);
> progress.setProgress(99);
>
> then try
>
> progress.setMessage("0%");
> ......
> //some process load
> .......
> progress.setMessage("50%");
> .......
> //some process load
> ........
> progress.setMessage("100%");
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to