本文整理汇总了Java中android.app.ProgressDialog.show方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.show方法的具体用法?Java ProgressDialog.show怎么用?Java ProgressDialog.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.app.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadChart
import android.app.ProgressDialog; //导入方法依赖的package包/类
public static void loadChart(final Context context, final String strChartFilePath) {
final ProgressDialog dlgLoadingChartProgress = ProgressDialog.show(context, context.getString(R.string.please_wait),
context.getString(R.string.loading_chart), true);
final Handler handler = new Handler();
Thread threadLoadChart = new Thread(new Runnable() {
@Override
public void run() {
final Intent intent = new Intent(context, ActivityChartDemon.class);
intent.putExtra(ChartOperator.VMFPChartPath, strChartFilePath);
handler.post(new Runnable() {
@Override
public void run() {
context.startActivity(intent);
dlgLoadingChartProgress.dismiss();
}
});
}
});
threadLoadChart.start();
}
示例2: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
//
mProgressDialog = new ProgressDialog(context,
ProgressDialog.THEME_DEVICE_DEFAULT_LIGHT);
mProgressDialog.setTitle("");
mProgressDialog.setMessage(activity
.getString(R.string.mixradio_dialog));
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mProgressDialog.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
//
mTask.cancel(true);
}
});
mProgressDialog.show();
super.onPreExecute();
}
示例3: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
// hack to get theme applied (which is not automatically applied due to activity's Theme.NoDisplay
ContextThemeWrapper theme = new ContextThemeWrapper(InstallExtensionDialogActivity.this,
FDroidApp.getCurThemeResId());
progressDialog = new ProgressDialog(theme);
progressDialog.setMessage(getString(R.string.system_install_uninstalling));
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
progressDialog.show();
}
示例4: FileUploadPrepareTask
import android.app.ProgressDialog; //导入方法依赖的package包/类
public FileUploadPrepareTask(Context context, String fileToUploadPath, int size) {
path = fileToUploadPath;
progressDialog = new ProgressDialog(context);
progressDialog.setIndeterminate(true);
progressDialog.setMessage(getString(R.string.processing_image));
progressDialog.show();
}
示例5: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(Log_in.this);
pDialog.setMessage("Loging in....");
pDialog.setIndeterminate(false);
pDialog.setCancelable(false);
pDialog.show();
}
示例6: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = new ProgressDialog(mContext);
mProgressDialog.setTitle(mContext.getString(R.string.a_003));
mProgressDialog.setMessage(mContext.getString(R.string.f_001));
mProgressDialog.setCancelable(false);
mProgressDialog.show();
}
示例7: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = ProgressDialog.show(mContext,
mContext.getString(R.string.tuning_antenna), mContext.getString(R.string.tuning_antenna_desc),
true, false);
}
示例8: showProgressDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* 显示圆形进度对话框
*
* @author JPH
* Date 2014-12-12 下午7:04:09
* @param activity
* @param progressTitle
* 显示的标题
* @return
*/
public static ProgressDialog showProgressDialog(final Activity activity,
String... progressTitle) {
if(activity==null||activity.isFinishing())return null;
String title = activity.getResources().getString(R.string.tip_tips);
if (progressTitle != null && progressTitle.length > 0)
title = progressTitle[0];
ProgressDialog progressDialog = new ProgressDialog(activity);
progressDialog.setTitle(title);
progressDialog.setCancelable(false);
progressDialog.show();
return progressDialog;
}
示例9: startKeyGen
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void startKeyGen() {
progress = new ProgressDialog(GeneratePubkeyActivity.this);
progress.setMessage(GeneratePubkeyActivity.this.getResources().getText(R.string.pubkey_generating));
progress.setIndeterminate(true);
progress.setCancelable(false);
progress.show();
Log.d(TAG, "Starting generation of " + keyType + " of strength " + bits);
KeyGeneratorRunnable keyGen = new KeyGeneratorRunnable(keyType.name, bits, entropy, this);
Thread keyGenThread = new Thread(keyGen);
keyGenThread.setName("KeyGen " + keyType + " " + bits);
keyGenThread.start();
}
示例10: initialize
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void initialize() {
// resize must be down whether there is progressing dialog or not
super.initialize();
if (mdlgDataRecalcing == null) { // because it is initializing, mdlgDataRecalcing is always null.
mdlgDataRecalcing = ProgressDialog.show(mcontext, mcontext.getString(R.string.please_wait),
mcontext.getString(R.string.calculating_chart_data), true);
}
}
示例11: showProgressDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* Show the loading progress
* @param context - the current app context
*/
private void showProgressDialog(Context context, String message) {
mProgressDialog = new ProgressDialog(context);
mProgressDialog.setMessage(message);
mProgressDialog.setIndeterminate(true);
mProgressDialog.setCancelable(false);
mProgressDialog.show();
}
示例12: onCreateDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
protected Dialog onCreateDialog(int id) {
prgDialog = new ProgressDialog(context);
prgDialog.setMessage(context.getResources().getString(R.string.updating));
prgDialog.setMax(100);
prgDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
prgDialog.show();
return prgDialog;
}
示例13: onActivityResult
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == Utils.DESCRIPTOR_ASSOCIATE) {
Toast.makeText(getActivity(), "OK", Toast.LENGTH_SHORT).show();
} else if (requestCode == Utils.PROFILE_PICK) {
if(data == null)
return;
progress = new ProgressDialog(getActivity());
progress.setTitle("Loading");
progress.setMessage("Please wait while the profile is loaded.");
progress.show();
try {
File profile = new File(data.getData().getPath());
new AsyncProfileLoader(ConfigurationFragment.this)
.execute(new FileInputStream(profile));
} catch (FileNotFoundException e) {
Log.e("IO", "FILE NOT FOUND " + e.toString());
}
}
}
示例14: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
progressDialog = new ProgressDialog(MainActivity.this);
progressDialog.setMessage("Please wait!");
progressDialog.setCancelable(true);
progressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
cancel(true);
}
});
progressDialog.show();
}
示例15: zoom
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void zoom(double dXRatio, double dYRatio) {
if (dXRatio != 1 || dYRatio != 1) {
if (mdlgDataRecalcing == null) {
mdlgDataRecalcing = ProgressDialog.show(mcontext, mcontext.getString(R.string.please_wait),
mcontext.getString(R.string.calculating_chart_data), true);
super.zoom(dXRatio, dYRatio);
}
}
}