protected override void OnResume() { base.OnResume(); ShowDisclaimerDialog(); amountLbl = FindViewById <TextView>(Resource.Id.amountLbl); var nextAmountBtn = FindViewById <Button>(Resource.Id.nextAmountBtn); var donateAmountBtn = FindViewById <Button>(Resource.Id.donateAmountBtn); nextAmountBtn.Click += delegate { ++currentIndex; if (currentIndex > 4) { currentIndex = 0; } AnimHelper.Animate(amountLbl, "rotationY", 1000, new AnticipateInterpolator(), 0, 360); amountLbl.Text = amounts[currentIndex]; }; donateAmountBtn.Click += delegate { var intent = new Intent(Intent.ActionView); var url = amountLbl.Text != "Your choice" ? $"{AppResources.PaypalLink}{amountLbl.Text.Substring(1, amountLbl.Text.Length - 1)}" : AppResources.PaypalLink; intent.SetData(Android.Net.Uri.Parse(url)); StartActivity(Intent.CreateChooser(intent, "Thank you for your donation! Please select any browser here.")); }; }
public void CheckIfEmpty(EditText editText, string inputDescription) { editText.SetBackgroundResource(Resource.Color.primaryLight); if (!String.IsNullOrEmpty(editText.Text) || !String.IsNullOrWhiteSpace(editText.Text)) { valid = true; } else { string errorString = $"{inputDescription} is required."; valid = false; editText.SetError(errorString, null); editText.Background.SetColorFilter(Color.Tomato, PorterDuff.Mode.SrcIn); AnimHelper.Animate(editText, "rotationY", 500, new AnticipateOvershootInterpolator(), 20, 0, -20, 0); } }
private void FinishItemChange(bool WasLeftSwipe) { float direction = WasLeftSwipe ? 700 : -700; AnimHelper.Animate(detailsView, "translationX", 700, new AnticipateOvershootInterpolator(), direction, 0); ideaTitleLbl.Text = item.Title; ideaDescriptionLbl.Text = item.Description; if (item.Note == null) { noteCard.Visibility = ViewStates.Gone; } else { ShowNote(item.Note); } CheckAndSetBookmark(); }