Android examples for User Interface:ProgressDialog
show Progress Dialog and set properties
//package com.java2s; import android.app.ProgressDialog; import android.content.Context; public class Main { public static ProgressDialog showProgress1(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, boolean canceledOnTouchOutside) { ProgressDialog dialog = new ProgressDialog(context); dialog.setTitle(title);/*from w w w . j a va 2 s . c o m*/ dialog.setMessage(message); dialog.setIndeterminate(indeterminate); dialog.setCancelable(false); dialog.setCanceledOnTouchOutside(false); //dialog.setOnCancelListener(new AlixOnCancelListener((Activity) context)); dialog.show(); return dialog; } }