Hai dudes, Cany anyone tell me how to Create a ProgressDialog in Android?
+6
A:
Come on try to think first! http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
WarrenFaith
2010-09-14 11:33:13
@Mr.Warren Faith: Actually i tried this but that code not working for me the code is ProgressDialog dialog = ProgressDialog.show(MyActivity.this, "","Loading. Please wait...", true);
Tilsan The Fighter
2010-09-14 11:41:18
than you should specify your question, tell us what you have programmed and what happens, what kind of error you got... you are a user registered 28 days ago, you asked 20 questions and still don't know how to ask a good specific question... don't forget, the answers will be only as good as the question is...
WarrenFaith
2010-09-14 11:45:54
@Mr.Warren Faith :It runs eventhough the page is loaded ,similar like a infinite loop
Tilsan The Fighter
2010-09-14 12:05:35
I guess you never call `dismiss`... thats why it will never disappear... also I stop here, because you simply dont understand how this works... try again with a better question...
WarrenFaith
2010-09-14 12:07:21
+2
A:
See the below code if this helps you..
//progress bar
final ProgressDialog progress_dialog = new ProgressDialog(DialogboxExample.this);
progress_dialog.setMessage("Loading please wait..");
progress_dialog.setCancelable(true);
Button btnprogress = (Button) findViewById(R.id.button3);
btnprogress.setOnClickListener(new OnClickListener(){
public void onClick(View v)
{
progress_dialog.show();
}
});
//progress bar percentage wise
final ProgressDialog progress_dialog2;
progress_dialog2 = new ProgressDialog(this);
progress_dialog2.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progress_dialog2.setMessage("Loeading..");
progress_dialog2.incrementProgressBy(10);
//progress_dialog2.setProgress(100);
progress_dialog2.setCancelable(true);
Button btnprogress2 = (Button) findViewById(R.id.button4);
btnprogress2.setOnClickListener(new OnClickListener(){
public void onClick(View v)
{ progress_dialog2.show();}
});
krunal shah
2010-09-14 12:10:40
@Mr.krunal shah: can u pls tell me how to change that loading symbol of daisy wheel to some other symbol
Tilsan The Fighter
2010-09-14 12:32:32
Tilsan The Fighter
2010-09-14 14:14:02