Android examples for User Interface:ProgressDialog
Create and init ProgressDialog
//package com.java2s; import android.app.ProgressDialog; import android.content.Context; public class Main { public static ProgressDialog initProgressDialog(Context context, int resid) { String message = context.getResources().getString(resid); return initProgressDialog(context, message); }/*w w w . j av a 2 s . c o m*/ public static ProgressDialog initProgressDialog(Context context, String message) { ProgressDialog progressDialog = new ProgressDialog(context); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.setMessage(message); progressDialog.setCancelable(true); progressDialog.show(); return progressDialog; } }