本文整理汇总了Java中android.app.ProgressDialog.setCancelable方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.setCancelable方法的具体用法?Java ProgressDialog.setCancelable怎么用?Java ProgressDialog.setCancelable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.app.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.setCancelable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case progress_bar_type:
progrssDialog = new ProgressDialog(this);
progrssDialog.setMessage("Downloading model. Please wait...");
progrssDialog.setIndeterminate(false);
progrssDialog.setMax(100);
progrssDialog.setCancelable(false);
progrssDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progrssDialog.show();
return progrssDialog;
default:
return null;
}
}
示例2: shareProtoFileDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
public static void shareProtoFileDialog(Context c, String folder, String name) {
final ProgressDialog progress = new ProgressDialog(c);
progress.setTitle("Exporting .proto");
progress.setMessage("Your project will be ready soon!");
progress.setCancelable(true);
progress.setCanceledOnTouchOutside(false);
progress.show();
Project p = new Project(folder, name);
String zipFilePath = exportProjectAsProtoFile(p);
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(zipFilePath)));
shareIntent.setType("application/zip");
progress.dismiss();
c.startActivity(Intent.createChooser(shareIntent, c.getResources().getText(R.string.share_phonk_file)));
}
示例3: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_publish);
toolbar.setNavigationIcon(R.drawable.ic_arrow_back_grey600_24dp);
photoSize = getResources().getDimensionPixelSize(R.dimen.publish_photo_thumbnail_size);
storage = FirebaseStorage.getInstance();
storageRef = storage.getReference().child("imgaes/" + System.currentTimeMillis() + ".jpg");
if (savedInstanceState == null) {
photoUri = getIntent().getParcelableExtra(ARG_TAKEN_PHOTO_URI);
} else {
photoUri = savedInstanceState.getParcelable(ARG_TAKEN_PHOTO_URI);
}
updateStatusBarColor();
progressDialog = new ProgressDialog(this);
progressDialog.setCancelable(false);
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.setMessage("Wait..");
loadThumbnailPhoto();
}
示例4: viewPostInBrowser
import android.app.ProgressDialog; //导入方法依赖的package包/类
public void viewPostInBrowser(boolean saveBeforeViewing) {
mbPreviewPost = true;
Observable<Boolean> waitForNetworkObservable;
if (saveBeforeViewing) {
waitForNetworkObservable = mPostEditFragment.onSaveClicked();
} else {
waitForNetworkObservable = Observable.just(false);
}
Consumer<Boolean> waitForNetworkAction = isNetworkCallPending -> {
if (isNetworkCallPending) {
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setIndeterminate(true);
mProgressDialog.setMessage(getString(R.string.save_post_progress));
mProgressDialog.setCancelable(false);
mProgressDialog.show();
mHandler.postDelayed(mSaveTimeoutRunnable, 10000);
} else {
mbPreviewPost = false;
startBrowserActivity(PostUtils.getPostUrl(mPost));
}
};
disposeOnPause(
waitForNetworkObservable.subscribe(waitForNetworkAction));
}
示例5: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv = (TextView) findViewById(R.id.label);
handler = new Handler(getMainLooper());
progressDialog = new ProgressDialog(this);
progressDialog.setMessage("Downloading MP3...");
progressDialog.setIndeterminate(true);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setCancelable(true);
if(!requestPermissions()){
handleIntent();
}
}
示例6: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
// 创建一个进度条对话框
pdlg = new ProgressDialog(mContext);
// 设置标题
pdlg.setTitle(R.string.translating);
// 进度条对话框设置点击外面不消失
pdlg.setCancelable(false);
// 设置进度条对话框样式
pdlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);
// 显示进度条对话框
pdlg.show();
}
示例7: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
// Showing progress dialog
pDialog = new ProgressDialog(KotaActivity.this);
pDialog.setMessage("Please wait...");
pDialog.setCancelable(false);
pDialog.show();
}
示例8: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
// Showing progress dialog
pDialog = new ProgressDialog(MainActivity.this);
pDialog.setMessage("Please wait...");
pDialog.setCancelable(false);
pDialog.show();
}
示例9: showDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
public void showDialog(){
//start progress dialog
progressDialog = new ProgressDialog(context);
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
progressDialog.setMessage(getString(R.string.loading));
progressDialog.show();
}
示例10: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
protected void onPreExecute() {
mDlg = new ProgressDialog(EditBuildActivity.this);
mDlg.setMessage(getString(R.string.edit_build_save_in_progress));
mDlg.setCancelable(false);
mDlg.setIndeterminate(true);
mDlg.show();
}
示例11: getLoadingDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
public static Dialog getLoadingDialog(Context context, String title,
boolean canCancel) {
ProgressDialog dialog = new ProgressDialog(context);
dialog.setCancelable(canCancel);
dialog.setMessage(title);
return dialog;
}
示例12: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
protected void onPreExecute() {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setCancelable(false);
progressDialog.setMessage(getActivity().getString(R.string.sending_password_reset_request));
progressDialog.show();
}
示例13: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
progressDialog = new ProgressDialog(this);
progressDialog.setIndeterminate(false);
progressDialog.setCancelable(false);
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progressDialog.show();
PreferencesUtil.getInstance().apply(this);
}
示例14: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
protected void onPreExecute() {
progressDialog = new ProgressDialog(activity);
progressDialog.setMessage(activity.getString(R.string.deleting));
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setIndeterminate(true);
progressDialog.setProgressNumberFormat(null);
progressDialog.setProgressPercentFormat(null);
progressDialog.setCancelable(false);
progressDialog.show();
}
示例15: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onPreExecute() {
dialog = new ProgressDialog(context);
dialog.setIndeterminate(true);
dialog.setMessage("preparing gif to share ...");
dialog.setCancelable(false);
dialog.show();
}