Пример #1
0
 public override void OnBackPressed()
 {
     PreferenceHelper.PutBoolean("dialogShown", false);
     Finish();
     OverridePendingTransition(Resource.Animation.push_down_in, Resource.Animation.push_down_out);
     base.OnBackPressed();
 }
Пример #2
0
        private void ShowDisclaimerDialog()
        {
            var dialogAlreadyShown = GetPreferences(FileCreationMode.Private).GetBoolean("dialogShown", false);

            if (!dialogAlreadyShown)
            {
                new Android.App.AlertDialog.Builder(this)
                .SetTitle("Important info")
                .SetMessage(Resources.GetString(Resource.String.donateText))
                .SetPositiveButton("I understand", (s, e) => { return; })
                .SetCancelable(false)
                .Create()
                .Show();

                PreferenceHelper.PutBoolean("dialogShown", true);
            }
        }