当前位置: 首页>>代码示例>>Java>>正文


Java ProgressDialog.setCancelable方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:interactionlab,项目名称:imui-tutorial,代码行数:17,代码来源:MainActivity.java

示例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)));
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:21,代码来源:PhonkScriptHelper.java

示例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();

}
 
开发者ID:NarendraSickarwar,项目名称:FirebasePost,代码行数:22,代码来源:PublishActivity.java

示例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));
}
 
开发者ID:TryGhost,项目名称:Ghost-Android,代码行数:25,代码来源:PostViewActivity.java

示例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();
    }
}
 
开发者ID:bornabesic,项目名称:yt-mp3-downloader-android,代码行数:19,代码来源:MainActivity.java

示例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();
}
 
开发者ID:seaase,项目名称:ArscEditor,代码行数:14,代码来源:DoTranslate.java

示例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();

}
 
开发者ID:bachors,项目名称:Android-Kode-POS,代码行数:11,代码来源:KotaActivity.java

示例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();

}
 
开发者ID:bachors,项目名称:Android-Kode-POS,代码行数:11,代码来源:MainActivity.java

示例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();
}
 
开发者ID:fekracomputers,项目名称:MuslimMateAndroid,代码行数:9,代码来源:SelectLocationTabsActivity.java

示例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();
}
 
开发者ID:kiwiandroiddev,项目名称:starcraft-2-build-player,代码行数:8,代码来源:EditBuildActivity.java

示例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;
}
 
开发者ID:viseator,项目名称:MontageCam,代码行数:8,代码来源:BaseActivity.java

示例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();

 	}
 
开发者ID:Greenstand,项目名称:treetracker-android,代码行数:8,代码来源:ForgotPasswordFragment.java

示例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);
}
 
开发者ID:dmitrykolesnikovich,项目名称:featurea,代码行数:11,代码来源:ProjectActivity.java

示例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();
        }
 
开发者ID:enricocid,项目名称:Gallery-example,代码行数:12,代码来源:DeleteFileUtils.java

示例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();
}
 
开发者ID:myinnos,项目名称:GiphyImageResultsPreview,代码行数:9,代码来源:ShareGif.java


注:本文中的android.app.ProgressDialog.setCancelable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。