本文整理汇总了C#中Android.App.AlertDialog.Builder.SetInverseBackgroundForced方法的典型用法代码示例。如果您正苦于以下问题:C# AlertDialog.Builder.SetInverseBackgroundForced方法的具体用法?C# AlertDialog.Builder.SetInverseBackgroundForced怎么用?C# AlertDialog.Builder.SetInverseBackgroundForced使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.App.AlertDialog.Builder
的用法示例。
在下文中一共展示了AlertDialog.Builder.SetInverseBackgroundForced方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: showConfirmDialog
public void showConfirmDialog(string title, string content, string possitiveTitle, string negativeTitle){
var confirmDeferView = LayoutInflater.Inflate (Resource.Layout.popup_confirm_layout, null);
var tvTitle = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_title_confirm_popup);
var tvConfirm = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_info_popup);
var btnConfirmTalknow = confirmDeferView.FindViewById<Button> (Resource.Id.btn_confirm_tv_popup);
var btnDecline = confirmDeferView.FindViewById<Button> (Resource.Id.btn_decline_tv_popup);
tvTitle.Text = title;
tvConfirm.Text = content;
btnDecline.Text = negativeTitle;
btnConfirmTalknow.Text = possitiveTitle;
btnConfirmTalknow.Click += (sender, e) => {
dialog.Dismiss ();
actionConfirmDelegate.onOkConfirmClick ();
};
btnDecline.Click += (sender, e) => {
dialog.Dismiss ();
};
builder = new AlertDialog.Builder (_activity);
builder.SetInverseBackgroundForced (true);
builder.SetView (confirmDeferView);
dialog = builder.Create ();
dialog.SetCanceledOnTouchOutside (false);
try {
dialog.Show ();
} catch(Exception e){
Console.WriteLine (e.Message);
}
}
示例2: showEmailDialog
public void showEmailDialog(Guid specId){
var enterEmailView = LayoutInflater.Inflate (Resource.Layout.popup_enter_email, null);
var edEnterEmail = enterEmailView.FindViewById<EditText> (Resource.Id.edit_enter_email);
var edMyEmail = enterEmailView.FindViewById<EditText> (Resource.Id.edit_my_email);
var edMessEmail = enterEmailView.FindViewById<EditText> (Resource.Id.edit_enter_message);
var btnSend = enterEmailView.FindViewById<Button> (Resource.Id.btnSendEmail);
var btnCancel = enterEmailView.FindViewById<Button> (Resource.Id.btnCancelSendEmail);
builder = new AlertDialog.Builder (_activity);
builder.SetInverseBackgroundForced (true);
builder.SetView (enterEmailView);
dialogEquiry = builder.Create ();
dialogEquiry.SetCanceledOnTouchOutside(false);
btnSend.Enabled = false;
edMyEmail.Text = MApplication.getInstance ().sEmailAddress;
edEnterEmail.TextChanged += (sender, e) => {
if(edEnterEmail.Text.Count() > 0) {
btnSend.Enabled = true;
} else {
btnSend.Enabled = false;
}
};
btnSend.Click += (sender, e) => {
if(edMyEmail.Text.Trim().Count() > 0) {
if(Utils.checkValidateEmail(edMyEmail.Text.Trim())){
if (edEnterEmail.Text.Trim().Count() <= 0) {
btnSend.Enabled = false;
showNoticeEmail(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.require_email_profile));
} else {
emails.Clear();
emailsInvalid.Clear();
Utils.getEmailsProfileFromString(edEnterEmail.Text.ToString(), emails, emailsInvalid);
if(emailsInvalid.Count > 0) {
showNoticeEmail(_activity.GetString(Resource.String.invalid_email_title), getEmailInvalidFromList(emailsInvalid));
} else {
dialogEquiry.Dismiss();
actionDelegate.onSending();
sendEmailProfileRequest(specId, edMyEmail.Text.Trim(), edMessEmail.Text.Trim());
}
}
} else{
showNoticeEmail(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.invalid_email_reset));
}
} else {
showNoticeEmail(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.email_sender_require));
}
};
btnCancel.Click += (sender, e) => {
dialogEquiry.Dismiss();
};
dialogEquiry.Show ();
}
示例3: showPopupDefer
public void showPopupDefer(BookingInfo bookingInfo, DeferInfo deferInfo){
var confirmDeferView = LayoutInflater.Inflate (Resource.Layout.popup_confirm_layout, null);
var tvTitle = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_title_confirm_popup);
var tvConfirm = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_info_popup);
var btnConfirmDefer = confirmDeferView.FindViewById<Button> (Resource.Id.btn_confirm_tv_popup);
var btnDecline = confirmDeferView.FindViewById<Button> (Resource.Id.btn_decline_tv_popup);
tvConfirm.Gravity = global::Android.Views.GravityFlags.Left;
tvTitle.SetText (Android.Resource.String.delayed_title);
btnConfirmDefer.Text = "Accept";
btnDecline.Text = "Decline";
if (deferInfo.IsDefer) {
string strMinute = ((double)bookingInfo.Deferral).ToString ("C0", new CultureInfo ("en-us")).Substring (1) + " minutes.";
tvConfirm.TextFormatted = Html.FromHtml (String.Format (_activity.GetString (Resource.String.delay_minute_info), bookingInfo.SpecialistName, strMinute));
} else {
int iHours = (int)(bookingInfo.Deferral / 60);
tvConfirm.TextFormatted = Html.FromHtml (String.Format (_activity.GetString (Resource.String.delay_day_info), bookingInfo.SpecialistName, iHours));
}
OnTimerSendCancelDefer (bookingInfo.Id, deferInfo, 0);
btnConfirmDefer.Click += (sender, e) => {
dialog.Dismiss();
sendDeferTalkNow(bookingInfo, deferInfo);
if(timer != null) {
timer.Stop();
timer = null;
}
};
btnDecline.Click += (sender, e) => {
dialog.Dismiss();
sendCancelDeferTalkNow(bookingInfo.Id, deferInfo);
if(timer != null) {
timer.Stop();
timer = null;
}
};
builder = new AlertDialog.Builder (_activity);
builder.SetInverseBackgroundForced (true);
builder.SetView (confirmDeferView);
dialog = builder.Create ();
dialog.SetCanceledOnTouchOutside(false);
dialog.Show ();
}
示例4: CheckFirstRun
public void CheckFirstRun() {
bool isFirstRun = GetSharedPreferences("PREFERENCE", FileCreationMode.Private).GetBoolean("isFirstRun", true);
if (isFirstRun){
View view = (ScrollView)LayoutInflater.Inflate (Resource.Layout.ReportLayout, null);
//read locate
string loc=Java.Util.Locale.Default.Language;
string fileName = "report.txt";
string fileReport = "";
if (loc == "ru") {
fileName=fileName.Insert(6,"_ru");
}
using (StreamReader sr = new StreamReader (Assets.Open (fileName),System.Text.Encoding.UTF8))
{
fileReport = sr.ReadToEnd ();
}
// Place your dialog code here to display the dialog
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.SetInverseBackgroundForced (true);
AlertDialog alertdialog = builder.Create();
alertdialog.SetTitle(Resources.GetString(Resource.String.whatsNew));
alertdialog.SetMessage(fileReport//"1.0.2\n" +
// "- "+Resources.GetString(Resource.String.fixBug)+"\n"+
// "- "+Resources.GetString(Resource.String.animationUpdating)+"\n"
);
alertdialog.SetCancelable(false);
//alertdialog.Window.SetBackgroundDrawable(
//alertdialog.SetView (view);
alertdialog.SetButton(Resources.GetString(Resource.String.ok), (s,e)=> {
});
alertdialog.Show();
GetSharedPreferences("PREFERENCE", FileCreationMode.Private)
.Edit()
.PutBoolean("isFirstRun", false)
.Apply();
}
}
示例5: ShowDialog
//new AuthWS.AuthSvc().GetAuthToken(username, password);
public static void ShowDialog(String title, String message, Context context)
{
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.SetCancelable(true);
builder.SetTitle(title);
builder.SetInverseBackgroundForced(true);
builder.SetMessage(message);
builder.SetPositiveButton("OK", delegate {
});
AlertDialog alert = builder.Create();
alert.Show();
}
示例6: HandleException
public static void HandleException(Exception e, Context context, Boolean showDialog = true)
{
if (showDialog) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.SetCancelable(true);
builder.SetTitle("Error Logged");
builder.SetInverseBackgroundForced(true);
builder.SetMessage(e.Message);
builder.SetPositiveButton("OK", delegate {
});
AlertDialog alert = builder.Create();
alert.Show();
}
Log.Error(e.Source, e.Message + " \n " + e.InnerException);
}
示例7: OnCreateDialog
protected override Dialog OnCreateDialog (int id, Bundle args)
{
AlertDialog.Builder builder;
builder = new AlertDialog.Builder (this);
builder.SetInverseBackgroundForced (true);
switch (id) {
case 1:
{
builder.SetTitle (GetString(Resource.String.gps_request));
builder.SetPositiveButton (GetString(Resource.String.gps_enable), EnableClicked);
builder.SetNegativeButton (GetString(Resource.String.gps_cancel), CancelClicked);
dialog = builder.Create ();
break;
}
}
if (dialog != null) {
dialog.SetCanceledOnTouchOutside (false);
dialog.SetCancelable (false);
}
return dialog;
}
示例8: showNoticeEmail
private void showNoticeEmail(string title, string content){
var emailInvalidlView = LayoutInflater.Inflate (Resource.Layout.popup_notice_layout, null);
builder = new AlertDialog.Builder (_activity);
builder.SetInverseBackgroundForced (true);
builder.SetView (emailInvalidlView);
var tvTitle = emailInvalidlView.FindViewById<TextView> (Resource.Id.tv_title_notice_popup);
var tvInfo = emailInvalidlView.FindViewById<TextView> (Resource.Id.tv_info_popup_notice);
var btnOk = emailInvalidlView.FindViewById<Button> (Resource.Id.btn_ok_popup_notice);
tvTitle.Text = title;
tvInfo.Text = content;
btnOk.Click += (sender, e) => {
dialogNotice.Dismiss();
};
dialogNotice = builder.Create ();
dialogNotice.SetCanceledOnTouchOutside(false);
try {
dialogNotice.Show ();
} catch(Exception e){
Console.WriteLine (e.Message);
}
}
示例9: showRatingFeedback
public void showRatingFeedback(){
var ratingFeebackView = LayoutInflater.Inflate (Resource.Layout.popup_rating_feedback, null);
edFeeback = ratingFeebackView.FindViewById<EditText> (Resource.Id.edit_feedback);
var btnSend = ratingFeebackView.FindViewById<Button> (Resource.Id.btnSendFeedback);
var btnCancel = ratingFeebackView.FindViewById<Button> (Resource.Id.btnCancelFeeback);
var tvError = ratingFeebackView.FindViewById<TextView> (Resource.Id.tv_error_feedback);
var imgStar1 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar1);
var imgStar2 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar2);
var imgStar3 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar3);
var imgStar4 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar4);
tvError.SetText (Resource.String.feeback_error);
iNumStar = 0;
imgStar1.Click += (sender, e) => {
tvError.Visibility = ViewStates.Gone;
iNumStar = 1;
imgStar1.SetImageResource(Resource.Drawable.ic_star);
imgStar2.SetImageResource(Resource.Drawable.ic_star_disable);
imgStar3.SetImageResource(Resource.Drawable.ic_star_disable);
imgStar4.SetImageResource(Resource.Drawable.ic_star_disable);
};
imgStar2.Click += (sender, e) => {
tvError.Visibility = ViewStates.Gone;
iNumStar = 2;
imgStar1.SetImageResource(Resource.Drawable.ic_star);
imgStar2.SetImageResource(Resource.Drawable.ic_star);
imgStar3.SetImageResource(Resource.Drawable.ic_star_disable);
imgStar4.SetImageResource(Resource.Drawable.ic_star_disable);
};
imgStar3.Click += (sender, e) => {
tvError.Visibility = ViewStates.Gone;
iNumStar = 3;
imgStar1.SetImageResource(Resource.Drawable.ic_star);
imgStar2.SetImageResource(Resource.Drawable.ic_star);
imgStar3.SetImageResource(Resource.Drawable.ic_star);
imgStar4.SetImageResource(Resource.Drawable.ic_star_disable);
};
imgStar4.Click += (sender, e) => {
tvError.Visibility = ViewStates.Gone;
iNumStar = 4;
imgStar1.SetImageResource(Resource.Drawable.ic_star);
imgStar2.SetImageResource(Resource.Drawable.ic_star);
imgStar3.SetImageResource(Resource.Drawable.ic_star);
imgStar4.SetImageResource(Resource.Drawable.ic_star);
};
btnSend.Click += (sender, e) => {
if(iNumStar == 0) {
tvError.Visibility = ViewStates.Visible;
} else {
dialog.Dismiss();
actionRatingDelegate.onSendingRating();
sendFeedback();
}
};
btnCancel.Click += (sender, e) => {
dialog.Dismiss();
};
builder = new AlertDialog.Builder (_activity);
builder.SetInverseBackgroundForced (true);
builder.SetView (ratingFeebackView);
dialog = builder.Create ();
dialog.SetCanceledOnTouchOutside (false);
dialog.Show ();
}