private void VerifyNow_Button_Clicked(object sender, EventArgs e) { activityIndicator.IsVisible = true; if (lblOtpDigit1.Text + lblOtpDigit2.Text + lblOtpDigit3.Text + lblOtpDigit4.Text == responseOtp) { Task.Delay(1000); activityIndicator.IsVisible = false; Navigation.PushAsync(new HomePage(), true); } else { activityIndicator.IsVisible = false; lblOtpDigit1.Text = lblOtpDigit2.Text = lblOtpDigit3.Text = lblOtpDigit4.Text = UpperInvisiblEntry.Text = ""; Application.Current.MainPage.DisplayAlert(AppConstants.AlertHeading, AppConstants.WongOtpMessage, AppConstants.AletOk); UpperInvisiblEntry.Focus(); } }
async private void Submit_Button_Clicked(object sender, EventArgs e) { contentViewEnterNumber.IsVisible = false; contentViewEnterOtp.IsVisible = true; UpperInvisiblEntry.Focus(); int temp = 85; Device.StartTimer(TimeSpan.FromSeconds(1), () => { if (temp <= 0) { return(false); } TimeSpan maxSpan = TimeSpan.FromSeconds(temp--); Device.BeginInvokeOnMainThread(() => { spannableStringTimerText.Text = " Re-send in " + maxSpan.ToString(); }); return(true); }); //await RequestOTP(); }