Skip to content

Instantly share code, notes, and snippets.

@AlmisbahTS
Last active March 29, 2020 05:12
Show Gist options
  • Select an option

  • Save AlmisbahTS/0df79c9a75014e320cc71131ccfe2711 to your computer and use it in GitHub Desktop.

Select an option

Save AlmisbahTS/0df79c9a75014e320cc71131ccfe2711 to your computer and use it in GitHub Desktop.
Android Progress dialog
// import namespace
import android.app.ProgressDialog;
//initialize progress dialog
ProgressDialog progressDialog=new ProgressDialog(MainActivity.this);
//settings
//when dialog will displayed and if user click on screen it should not dissmiss
progressDialog.setCancelable(false);
//message which shows inside progress
progressDialog.setMessage("Please Wait!");
//show the progress when you needs by
progressDialog.show();
//dismess progress when you needs by
progressDialog.dismess();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment