本文整理汇总了C#中Android.App.ProgressDialog.SetIconAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.SetIconAttribute方法的具体用法?C# ProgressDialog.SetIconAttribute怎么用?C# ProgressDialog.SetIconAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.App.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.SetIconAttribute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateDialog
protected override Dialog OnCreateDialog(int id)
{
switch (id) {
case DIALOG_YES_NO_MESSAGE: {
var builder = new AlertDialog.Builder (this);
builder.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
builder.SetTitle (Resource.String.alert_dialog_two_buttons_title);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
return builder.Create ();
}
case DIALOG_YES_NO_OLD_SCHOOL_MESSAGE: {
var builder = new AlertDialog.Builder (this, Android.App.AlertDialog.ThemeTraditional);
builder.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
builder.SetTitle (Resource.String.alert_dialog_two_buttons_title);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
return builder.Create ();
}
case DIALOG_YES_NO_HOLO_LIGHT_MESSAGE: {
var builder = new AlertDialog.Builder (this, Android.App.AlertDialog.ThemeHoloLight);
builder.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
builder.SetTitle (Resource.String.alert_dialog_two_buttons_title);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
return builder.Create ();
}
case DIALOG_YES_NO_LONG_MESSAGE: {
var builder = new AlertDialog.Builder (this);
builder.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
builder.SetTitle (Resource.String.alert_dialog_two_buttons_msg);
builder.SetMessage (Resource.String.alert_dialog_two_buttons_msg);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
builder.SetNeutralButton (Resource.String.alert_dialog_something, NeutralClicked);
return builder.Create ();
}
case DIALOG_YES_NO_ULTRA_LONG_MESSAGE: {
var builder = new AlertDialog.Builder (this);
builder.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
builder.SetTitle (Resource.String.alert_dialog_two_buttons_msg);
builder.SetMessage (Resource.String.alert_dialog_two_buttons2ultra_msg);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
builder.SetNeutralButton (Resource.String.alert_dialog_something, NeutralClicked);
return builder.Create ();
}
case DIALOG_LIST: {
var builder = new AlertDialog.Builder (this);
builder.SetTitle (Resource.String.select_dialog);
builder.SetItems (Resource.Array.select_dialog_items, ListClicked);
return builder.Create ();
}
case DIALOG_PROGRESS: {
progress_dialog = new ProgressDialog (this);
progress_dialog.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
progress_dialog.SetTitle (Resource.String.select_dialog);
progress_dialog.SetProgressStyle (ProgressDialogStyle.Horizontal);
progress_dialog.Max = MAX_PROGRESS;
progress_dialog.SetButton (Android.App.Dialog.InterfaceConsts.ButtonPositive, GetText (Resource.String.alert_dialog_ok), OkClicked);
progress_dialog.SetButton (Android.App.Dialog.InterfaceConsts.ButtonNegative, GetText (Resource.String.alert_dialog_cancel), CancelClicked);
return progress_dialog;
}
case DIALOG_SINGLE_CHOICE: {
var builder = new AlertDialog.Builder (this);
builder.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
builder.SetTitle (Resource.String.alert_dialog_single_choice);
builder.SetSingleChoiceItems (Resource.Array.select_dialog_items2, 0, ListClicked);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
return builder.Create ();
}
case DIALOG_MULTIPLE_CHOICE: {
var builder = new AlertDialog.Builder (this);
builder.SetIcon (Resource.Drawable.ic_popup_reminder);
builder.SetTitle (Resource.String.alert_dialog_multi_choice);
builder.SetMultiChoiceItems (Resource.Array.select_dialog_items3, new bool[] { false, true, false, true, false, false, false }, MultiListClicked);
builder.SetPositiveButton (Resource.String.alert_dialog_ok, OkClicked);
builder.SetNegativeButton (Resource.String.alert_dialog_cancel, CancelClicked);
return builder.Create ();
}
case DIALOG_MULTIPLE_CHOICE_CURSOR: {
var projection = new string[] { BaseColumns.Id, Contacts.PeopleColumns.DisplayName, Contacts.PeopleColumns.SendToVoicemail };
var cursor = ManagedQuery (ContactsContract.Contacts.ContentUri, projection, null, null, null);
var builder = new AlertDialog.Builder (this);
builder.SetIcon (Resource.Drawable.ic_popup_reminder);
builder.SetTitle (Resource.String.alert_dialog_multi_choice_cursor);
//.........这里部分代码省略.........
示例2: OnCreateDialog
protected override Dialog OnCreateDialog(int id)
{
switch(id)
{
case (int)Utilities.DIALOGTYPE.DIALOG_PROGRESS: // DIALOG_PROGRESS
{
progressDialog = new ProgressDialog (this);
progressDialog.SetIconAttribute (Android.Resource.Attribute.AlertDialogIcon);
progressDialog.SetTitle (Resources.GetString(Resource.String.DownloadingOffline));
progressDialog.SetProgressStyle (ProgressDialogStyle.Horizontal);
progressDialog.Max = 100;
return progressDialog;
}
default:
{
return base.OnCreateDialog(id);
}
}
}