Custom ProgressDialog Problem

Put your problem here if it does not fit any of the other categories.

Custom ProgressDialog Problem

Postby org4nik » Tue Mar 29, 2011 9:58 am

Hi All,

I am building an application for android and i am using a ProgressDialog in it. I am testing it on two different emulators. The dialog show up in android 2.3.3 emulator but does not show up in android 1.6 emulator. I wonder what's the problem.

Thanks in advance!
org4nik
Freshman
Freshman
 
Posts: 3
Joined: Wed Feb 23, 2011 10:20 am

Top

Re: Custom ProgressDialog Problem

Postby raj_J2ME » Tue Mar 29, 2011 10:06 am

May be this can be the issue with the emulator..I will recommend you to test the same on some other emulators too. What is happening on the real device?
Also try the both version of the progress dialog.
Check and revert.
Thanks with Regards,
Raj - The Kernel
raj_J2ME
Master Developer
Master Developer
 
Posts: 311
Joined: Tue Feb 15, 2011 7:40 am
Location: The Capital of India,

Re: Custom ProgressDialog Problem

Postby YaminiT » Thu Feb 23, 2012 8:29 am

Hi, I am new to android, I am using android 2.3.3. I have a requirement to modify the progress format of "60/100" to "1.3 kb/2.3Mb". So i have searched forums but I haven't found any solution so far.
I feel its better to implement custom progress dialog.

Could you please help me "how to create the custom progress dialog".

Thanks & Regards
Yamini.
YaminiT
Freshman
Freshman
 
Posts: 4
Joined: Fri Feb 10, 2012 7:43 am

Re: Custom ProgressDialog Problem

Postby Phyll » Thu Feb 23, 2012 12:33 pm

Hi YaminiT,

You can use ProgressDialog.setProgressNumberFormat() to display your byte units instead of the numbers and just a slash like 60/100. The default format for this is "%1d/%2d". To show what you want to show you should have something like "%1dMb/%2dMb". I don't think this can be changed after the dialog is shown.

Check it out here:

http://developer.android.com/reference/ ... ang.String)

Hope this helps.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Custom ProgressDialog Problem

Postby YaminiT » Thu Feb 23, 2012 1:24 pm

Hi phyll,

Thank you for your reply.

What you said is applicable to the higher versions of androidV11. But I am using androidV10.

Thanks & Regards
Yamini T.
YaminiT
Freshman
Freshman
 
Posts: 4
Joined: Fri Feb 10, 2012 7:43 am

Re: Custom ProgressDialog Problem

Postby Phyll » Thu Feb 23, 2012 1:48 pm

Hi YaminiT,

For using on any version of Android you can make one yourself from scractch and show anything you like.

Create a dialog extended from Dialog.

Here's some info on that: http://developer.android.com/guide/topi ... alogs.html

Hope this helps.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Top

Re: Custom ProgressDialog Problem

Postby Phyll » Thu Feb 23, 2012 4:10 pm

Hi YaminiT,

Here is an example project that shows how to make a custom progress dialog:

Hope this helps.

Phyll
Attachments
CustomProgress.zip
Custom Progress Example
(81 KiB) Downloaded 74 times
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Custom ProgressDialog Problem

Postby YaminiT » Mon Feb 27, 2012 3:12 pm

Thank you Phyll.

Your CustomProgress.Zip is very useful.

Regards
Yamini T.
YaminiT
Freshman
Freshman
 
Posts: 4
Joined: Fri Feb 10, 2012 7:43 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 27 guests