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


C# ProgressDialog.setTitle方法代码示例

本文整理汇总了C#中Android.App.ProgressDialog.setTitle方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.setTitle方法的具体用法?C# ProgressDialog.setTitle怎么用?C# ProgressDialog.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Android.App.ProgressDialog的用法示例。


在下文中一共展示了ProgressDialog.setTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreateDialog

        protected Dialog OnCreateDialog(int id)
        {
            Dialog dialog;
            AlertDialog alertDialog;
            switch(id) {
                case DIALOG_SYNC:
                    string serviceDescription = SyncManager.getInstance().getCurrentService().getDescription();
                    syncProgressDialog = new ProgressDialog(this);
                    syncProgressDialog.setTitle(string.format(GetString(Resource.String.syncing),serviceDescription));
                    syncProgressDialog.setMessage(GetString(Resource.String.syncing_connect));
                    syncProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            //					syncProgressDialog.setButton(ProgressDialog.BUTTON_NEGATIVE, GetString(Resource.String.cancel), new DialogInterface.OnClickListener() {
            //						public void onClick(DialogInterface dialog, int which) {
            //							syncProgressDialog.cancel();
            //						}
            //					});
            //					syncProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
            //
            //						public void onCancel(DialogInterface dialog) {
            //							SyncManager.getInstance().cancel();
            //						}
            //
            //					});
                    syncProgressDialog.setIndeterminate(true);
                    return syncProgressDialog;
                case DIALOG_DELETE:
                    alertDialog = new AlertDialog.Builder(this)
                    .setIcon(android.Resource.Drawable.ic_dialog_alert)
                    .setTitle(Resource.String.delete_all)
                    .setMessage(Resource.String.delete_all_message)
            //			        .setPositiveButton(Resource.String.yes, new DialogInterface.OnClickListener() {
            //
            //			            public void onClick(DialogInterface dialog, int which) {
            //			            	resetLocalDatabase();
            //			           }
            //
            //			        })
                    .setNegativeButton(Resource.String.no, null)
                    .create();
                    return alertDialog;

                case DIALOG_DEL_REMOTE:
                    alertDialog = new AlertDialog.Builder(this)
                    .setIcon(android.Resource.Drawable.ic_dialog_alert)
                    .setTitle(Resource.String.delete_remote_notes)
                    .setMessage(Resource.String.delete_remote_notes_message)
            //			        .setPositiveButton(Resource.String.yes, new DialogInterface.OnClickListener() {
            //
            //			            public void onClick(DialogInterface dialog, int which) {
            //			            	resetRemoteService();
            //			           }
            //
            //			        })
                    .setNegativeButton(Resource.String.no, null)
                    .create();
                    return alertDialog;

                case DIALOG_BACKUP:
                    alertDialog = new AlertDialog.Builder(activity)
                    .setIcon(android.Resource.Drawable.ic_dialog_alert)
                    .setTitle(Resource.String.backup_notes_title)
                    .setMessage(Resource.String.backup_notes)
            //			        .setPositiveButton(Resource.String.yes, new DialogInterface.OnClickListener() {
            //
            //			            public void onClick(DialogInterface dialog, int which) {
            //			        		ShowDialog(DIALOG_SYNC);
            //			            	SyncManager.getService("sdcard").backupNotes();
            //			           }
            //
            //			        })
                    .setNegativeButton(Resource.String.no, null)
                    .create();
                    return alertDialog;
                case DIALOG_CONNECT_FAILED:
                    alertDialog = new AlertDialog.Builder(this)
                    .setMessage(GetString(Resource.String.prefSyncConnectionFailed))
            //					.setNeutralButton(GetString(Resource.String.btnOk), new OnClickListener() {
            //						public void onClick(DialogInterface dialog, int which) {
            //							dialog.dismiss();
            //						}})
                    .create();
                    return alertDialog;

                case DIALOG_FOLDER_ERROR:
                case DIALOG_INVALID_ENTRY:
                    alertDialog = new AlertDialog.Builder(this)
                    .setTitle(GetString(Resource.String.error))
                    .setMessage(dialogstring)
            //					.setNeutralButton(GetString(Resource.String.btnOk), new OnClickListener() {
            //						public void onClick(DialogInterface dialog, int which) {
            //							dialog.dismiss();
            //						}})
                    .create();
                    return alertDialog;
                default:
                    dialog = null;
                }
            return dialog;
        }
开发者ID:decriptor,项目名称:tomdroid,代码行数:99,代码来源:PreferencesActivity.cs


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