private void Control_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            //var entry = sender as EditText;
            //var text = entry.Text;
            //if (text.Equals("0.00") || text.Equals("$0.00") || text.Equals("0"))
            //{
            //    entry.Text = "";
            //}
            //var array = text.ToCharArray();
            //var dotCount = array.Count(c => c == '.');
            //var lastIndex = text.LastIndexOf('.');
            //if (dotCount > 1)
            //{

            //    entry.Text = text.Remove(lastIndex, text.Length - lastIndex);
            //}
            //else if (dotCount == 1)
            //{
            //    Console.WriteLine($"text.length = {text.Length}");
            //    Console.WriteLine($"lastIndex = {lastIndex}");
            //    Console.WriteLine();
            //    if ((text.Length - lastIndex) > 3)
            //    {
            //        entry.Text = text.Substring(0, lastIndex + 3);
            //    }
            //}
        }
 private void EditText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     if (Element.Text != Control.EditText.Text)
     {
         Element.Text = Control.EditText.Text;
     }
 }
Exemplo n.º 3
0
        private void Control_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            var control = sender as FormsEditText;

            control.SetSelection(control.Text.Length);

            var lastChar = e.Text?.LastOrDefault();

            if (lastChar != ',' && lastChar != '.')
            {
                return;
            }

            if (!Regex.IsMatch(control.Text, DecimalRegEx))
            {
                control.Text = control.Text.Remove(control.Text.Length - 1);
            }

            var cultureDecimalSeparator = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;

            if (lastChar.ToString() == cultureDecimalSeparator)
            {
                return;
            }

            control.Text = control.Text.Replace(lastChar.ToString(), cultureDecimalSeparator);
        }
 private void NativePasswordChange(object sender, Android.Text.TextChangedEventArgs e)
 {
     this.Password = new string(e.Text.ToArray());
     if (this.PasswordChanged != null)
     {
         this.PasswordChanged(this, new RoutedEventArgs());
     }
 }
 private void KartSKT_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     if (KartSKT.Text.Length == 2)
     {
         KartSKT.Text = KartSKT.Text + "/";
         KartSKT.SetSelection(KartSKT.Text.Length);
     }
 }
        private void ControlOnTextChanged(object sender, TextChangedEventArgs textChangedEventArgs)
        {
            // whenever the text was changed, get the available width/height and execute the resize method
            var heightLimit = Height - PaddingBottom - PaddingTop;
            var widthLimit  = Width - PaddingLeft - PaddingRight;

            ResizeText(widthLimit, heightLimit);
        }
Exemplo n.º 7
0
 private void EditText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     // Ensure no key is pressed to clear focus
     if (this.EditText.Text.Length != 0 && !this.keyPressed)
     {
         this.EditText.ClearFocus();
         return;
     }
 }
Exemplo n.º 8
0
            private void edittext_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
            {
                EditText editText = (EditText)sender;

                string value = e.Text.ToString();

                string output = string.Format("TextEdit value as {0}", value);

                Console.WriteLine(output);
            }
 private void MEditTextProductName_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     mTxtProductName.Text       = mEditTextProductName.Text;
     mEditTextProductAlias.Text = mEditTextProductName.Text;
     if (mEditTextProductName.Text == "")
     {
         mTxtProductName.Text       = "Product name";
         mEditTextProductAlias.Text = "";
     }
 }
Exemplo n.º 10
0
        private void EditText_TextChanged(object sender, TextChangedEventArgs e)
        {
            var text = e.Text;
            if (text.Contains('\n'))
            {
                var textRemoveEnterChar = (text.ToString()).Trim();
                ((EditText)sender).Text = string.Empty;

                MainActivity.Store.Dispatch(new AddTodoAction { Text = textRemoveEnterChar });
            }
        }
Exemplo n.º 11
0
        private void OperationListAdapter_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            EditText etQty         = ((EditText)sender);
            var      OperationCode = etQty.Tag.ToString();
            var      item          = _list.Where(t => t.OperationCode == OperationCode).FirstOrDefault();

            if (etQty.Text != "")
            {
                item.Qty = Convert.ToInt32(etQty.Text);
            }
        }
Exemplo n.º 12
0
        void MobNumEdit_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            //has problem with selection start on change text in OnTextChanged event
            //use filter


            //int selection_ = this.SelectionStart;//!

            //_helper.textChanged();

            //if (selection_ >= this.Text.Length)//!
            //    selection_ = this.Text.Length;//!

            //if (selection_ != this.SelectionStart)
            //    this.SetSelection(selection_);//! important
        }
Exemplo n.º 13
0
        private void OnDescriptionTextChanged (object sender, Android.Text.TextChangedEventArgs e)
        {
            // This can be called when the fragment is being restored, so the previous value will be
            // set miraculously. So we need to make sure that this is indeed the user who is changing the
            // value by only acting when the OnStart has been called.
            if (!canRebind) {
                return;
            }

            // Mark description as changed
            descriptionChanging = TimeEntry != null && DescriptionEditText.Text != TimeEntry.Description;

            // Make sure that we're commiting 1 second after the user has stopped typing
            CancelDescriptionChangeAutoCommit ();
            if (descriptionChanging) {
                ScheduleDescriptionChangeAutoCommit ();
            }
        }
        private void EditTextOnTextChanged(object sender, TextChangedEventArgs args)
        {
            // As I type: send the EditText to the Forms Entry
            var selection = Control.EditText.SelectionStart;

            if (!_preventTextLoop)
            {
                Element.Text = args.Text.ToString();
            }
            if (Element == null || Element.Text == null)
            {
                return;
            }

            var index = selection > Element.Text.Length ? Element.Text.Length : selection;

            Control.EditText.SetSelection(index);
        }
Exemplo n.º 15
0
        private void Control_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            var view = (HtmlFormattedLabel)Element;

            if (view == null)
            {
                return;
            }
            Control.TextChanged -= Control_TextChanged;
            // var htmlText = !string.IsNullOrEmpty(view.Text) ? string.Format("{0}{1}", Html.FromHtml(view.Text), Html.FromHtml(view.Text).ToString().Length > 30 ? "...":"") : null;
            // var htmlText = !string.IsNullOrEmpty(view.Text) ? Html.FromHtml(view.Text) : null;
            // Control.SetText(htmlText, TextView.BufferType.Spannable);
            Element.FormattedText = new FormattedString()
            {
                Spans = { new Span()
                          {
                          } }
            };
        }
Exemplo n.º 16
0
        // Validates usernameField
        private void UsernameField_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            if (!usernameChanged)
            {
                usernameChanged = true;
            }

            EditText field = (EditText)sender;

            if (field.Text.Trim() == "")
            {
                validUsername = false;
            }
            else
            {
                validUsername = true;
            }

            Validate();
        }
Exemplo n.º 17
0
        private void PasswordField_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            if (!passwordChanged)
            {
                passwordChanged = true;
            }

            EditText field = (EditText)sender;

            if (field.Text == "")
            {
                validPassword = false;
            }
            else
            {
                validPassword = true;
            }

            Validate();
        }
 private void ProjectBitTextChangedHandler (object sender, TextChangedEventArgs e)
 {
     var t = ProjectBit.TextField.Text;
     if (t != viewModel.Model.Name) {
         viewModel.Model.Name = t;
     }
 }
Exemplo n.º 19
0
 private void On_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     SetText();
 }
 /// <summary>
 /// Trigger to update the IMEI and validate it from the database
 /// </summary>
 private void OnImeiNumberTextView_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     App.Locator.AddSeekios.SeekiosIMEI = IMEIEditText.Text;
     EnableSaveButton();
 }
Exemplo n.º 21
0
 /// <summary>
 /// Filter text changed event
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 void OnFilterTextChanged(object sender, Text.TextChangedEventArgs e)
 {
     GetData();
     _adapter.NotifyDataSetChanged();
 }
Exemplo n.º 22
0
 void OnTextChanged(object sender, TextChangedEventArgs e)
 {
     EmojiconHandler.AddEmojis(Context, new SpannableStringBuilder(TextFormatted), mEmojiconSize);
 }
 private void OnNameEditTextTextChanged (object sender, TextChangedEventArgs e)
 {
     ValidateClientName ();
 }
Exemplo n.º 24
0
 private void EditText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     ((EditText)sender).SetTextColor(Color.Black);
     ((EditText)sender).BackgroundTintList = GetColorStateList(Resource.Color.greenforshopcart);
 }
 void search_skaters_TextChanged(object sender, TextChangedEventArgs e)
 {
     lastPagePulled = 0;
     LegacyBar.ProgressBarVisibility = ViewStates.Visible;
     Action<LeaguesJson> leagues = new Action<LeaguesJson>(UpdateAdapter);
     var t = (EditText)sender;
     if (t.Text.Length == 0)
     {
         League.PullLeagues(lastPagePulled, PAGE_COUNT, lastLetterPulled, (Context)this, leagues);
     }
     else if (t.Text.Length > 2)
     {
         League.SearchLeagues(lastPagePulled, PAGE_COUNT, t.Text, (Context)this, leagues);
     }
     initialArray.Leagues.Clear();
 }
Exemplo n.º 26
0
 private void FirstnameTextOnTextChanged(object sender, TextChangedEventArgs textChangedEventArgs)
 {
     Firstname = FirstnameText.Text;
 }
Exemplo n.º 27
0
 private void AmountEditText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     this.RefreshTip();
 }
Exemplo n.º 28
0
 private void EditTextOnTextChanged(object sender, TextChangedEventArgs e)
 {
     var text = e.Text.ToString();
     SetConfirmButtonEnabled(!string.IsNullOrEmpty(text));
 }
Exemplo n.º 29
0
 private void InputSearchOnTextChanged(object sender, TextChangedEventArgs e)
 {
     _adapter.Filter.InvokeFilter(_inputSearch.Text);
 }
 private void OnNameEditTextTextChanged (object sender, TextChangedEventArgs e)
 {
     SyncButton ();
 }
 private void NativeControl_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     //Element.Focus();
     //NativeControl.ShowDropDown();
     //Element.RaiseTextChanged(NativeControl.Text);
 }
Exemplo n.º 32
0
 private void FromAmountEditText_TextChanged(object sender, TextChangedEventArgs e)
 {
     UpdateToAmount();
 }
Exemplo n.º 33
0
 void search_skaters_TextChanged(object sender, TextChangedEventArgs e)
 {
     lastPagePulled = 0;
     LegacyBar.ProgressBarVisibility = ViewStates.Visible;
     Action<EventsJson> evs = new Action<EventsJson>(UpdateAdapter);
     var t = (EditText)sender;
     if (t.Text.Length == 0)
     {
         RDNation.Droid.Classes.Public.Calendar.PullEvents(lastPagePulled, PAGE_COUNT, (Context)this, evs);
     }
     else if (t.Text.Length > 2)
     {
         RDNation.Droid.Classes.Public.Calendar.SearchEvents(lastPagePulled, PAGE_COUNT, t.Text, (Context)this, evs);
     }
     initialArray.Events.Clear();
 }
Exemplo n.º 34
0
 private void TextBoxTextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     this.Text = new string(e.Text.ToArray());
 }
Exemplo n.º 35
0
 private void OnEmailEditTextTextChanged (object sender, TextChangedEventArgs e)
 {
     SyncLoginButton ();
 }
Exemplo n.º 36
0
 void search_skaters_TextChanged(object sender, TextChangedEventArgs e)
 {
     lastPagePulled = 0;
     LegacyBar.ProgressBarVisibility = ViewStates.Visible;
     Action<ShopsJson> evs = new Action<ShopsJson>(UpdateAdapter);
     var t = (EditText)sender;
     if (t.Text.Length == 0)
     {
         Shop.PullShopItems(lastPagePulled, PAGE_COUNT, (Context)this, evs);
     }
     else if (t.Text.Length > 2)
     {
         Shop.SearchShopItems(lastPagePulled, PAGE_COUNT, t.Text, (Context)this, evs);
     }
     initialArray.Items.Clear();
 }
Exemplo n.º 37
0
 private void OnPasswordEditTextTextChanged (object sender, TextChangedEventArgs e)
 {
     SyncPasswordVisibility ();
     SyncLoginButton ();
 }
 /// <summary>
 /// Trigger to update the IMEI and validate it from the database
 /// </summary>
 private void PINEditText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     App.Locator.AddSeekios.SeekiosPIN = PINEditText.Text;
     EnableSaveButton();
 }
Exemplo n.º 39
0
 // Zoeken binnen het overzicht op het Overzicht scherm
 private void InputSearchTextChanged(object sender, TextChangedEventArgs args)
 {
     adapter.Filter.InvokeFilter (sv.Text);
 }
Exemplo n.º 40
0
 private void LastnameTextOnTextChanged(object sender, TextChangedEventArgs textChangedEventArgs)
 {
     Lastname = LastnameText.Text;
 }
Exemplo n.º 41
0
 private void OnPasswordEditTextTextChanged (object sender, TextChangedEventArgs e)
 {
     SyncPasswordVisibility ();
     SyncRegisterButton ();
     ValidatePasswordField (true);
 }
 void TextChangedEvent(object sender, Android.Text.TextChangedEventArgs e)
 {
     NotifyTextPosition();
     //e.Handled = false;
 }
Exemplo n.º 43
0
 void TxtClaveVozSexto_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
 {
     habilitarDesabilitarBoton();
     resetEditTextBorrado(txtClaveVoz.Text, txtClaveVozSegundo.Text, txtClaveVozTercero.Text, txtClaveVozCuarto.Text, txtClaveVozQuinto.Text, txtClaveVozSexto.Text);
 }