I want to show a user dialog like iphone HUD Progress Bar

I want to show a user dialog, for example, iphone hud progress Bar Style.but, I do not know how to create a custom dialog, for example, hud progress bar, for example iphone on android.

I need a custom dialog as shown below:

enter image description here

Help with me ...!

Thanks...

+8
android
source share
3 answers

I created a sample Android application and a ProgressHUD class that you can use for this purpose. You can find it here: https://github.com/anupamdhanuka/AndroidProgressHUD

+20
source share

Just look at this (my) library. IOSDialog / Spinner Library

It is very easy to use and solves your problem. With it, you can easily create and use a spinner, as in iOS. Code example:

final IOSDialog dialog1 = new IOSDialog.Builder(IOSDialogActivity.this) .setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { dialog0.show(); } }) .setDimAmount(3) .setSpinnerColorRes(R.color.colorGreen) .setMessageColorRes(R.color.colorAccent) .setTitle(R.string.standard_title) .setTitleColorRes(R.color.colorPrimary) .setMessageContent("My message") .setCancelable(true) .setMessageContentGravity(Gravity.END) .build(); 

Result

  final IOSDialog dialog0 = new IOSDialog.Builder(IOSDialogActivity.this) .setTitle("Default IOS bar") .setTitleColorRes(R.color.gray) .build(); 

Result: standard IOS dialog

+1
source share
  private class loadassync extends AsyncTask<String, Void, Void> { private final ProgressDialog dialog = new ProgressDialog( classname.this); protected void onPreExecute() { this.dialog.setMessage("loading....."); this.dialog.show(); } protected Void doInBackground(final String... args) { //add the logic while loading } protected void onPostExecute(final Void unused) { try { //add the logic after loading } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } if (this.dialog.isShowing()) { this.dialog.dismiss(); } } } 

execute assynctask

  Loadassync mAssyn1 = new LoadAssync(); mAssyn1.execute(); 
-one
source share

All Articles