Exemple #1
0
 void editText_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     if (fireInputs)
     {
         //Logging.Log.Debug ("'{0}' bc: {2} ac: {1} s: {3}", e.Text.ToString (), e.AfterCount, e.BeforeCount, e.Start);
         if (e.AfterCount - e.BeforeCount >= 0)
         {
             //This will create a fair amount of garbage, but the user probably cannot type that fast
             //Calling ThreadManager.invoke for each char creates garbage also.
             char[] inputArray = e.Text.Skip(e.Start + e.BeforeCount).ToArray();
             ThreadManager.invoke(() =>
             {
                 foreach (char c in inputArray)
                 {
                     inputHandler.injectKeyPressed(Engine.Platform.KeyboardButtonCode.KC_UNASSIGNED, c);
                     inputHandler.injectKeyReleased(Engine.Platform.KeyboardButtonCode.KC_UNASSIGNED);
                 }
             });
         }
         else
         {
             int count = e.BeforeCount - e.AfterCount;
             ThreadManager.invoke(() =>
             {
                 //Inject the backspace count on the main thread
                 for (int i = 0; i < count; ++i)
                 {
                     inputHandler.injectKeyPressed(Engine.Platform.KeyboardButtonCode.KC_BACK, 0);
                     inputHandler.injectKeyReleased(Engine.Platform.KeyboardButtonCode.KC_BACK);
                 }
             });
         }
     }
 }
Exemple #2
0
 private static void OnTextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     if (e.BeforeCount == 0 || e.AfterCount == 0)
     {
         UpdatePadding(sender as TextInputEditText);
     }
 }
 private void _usernameEditText_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     if (_usernameEditText.Text.Length > 5)
     {
         _loginButton.Enabled = true;
     }
     else
     {
         _loginButton.Enabled = false;
     }
 }
 private void EditText_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     if (e.Text.Count() > 5)
     {
         _connectButton.Enabled = true;
     }
     else
     {
         _connectButton.Enabled = false;
     }
 }
 void Native_BeforeTextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     if (source.Locked == false && source.Mask != null)
     {
         source.SelectionStart = native.SelectionStart;
         source.SelectionEnd   = native.SelectionEnd;
         source.TextLength     = native.Text.Length;
     }
     else if (source.Mask == null)
     {
         source.SelectionStart = native.SelectionStart;
         source.SelectionEnd   = native.SelectionEnd;
         source.TextLength     = native.Text.Length;
     }
 }
        private void OnTextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
        {
            if (EditText == null)
            {
                return;
            }

            var value = EditText.Text;

            EditText.TextChanged -= OnTextChanged;

            EditText.Text = value;
            EditText.SetSelection(EditText.Text.Length);

            EditText.TextChanged += OnTextChanged;

            FireValueChanged(value);
        }
        private void OnTextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
        {
            var target = Target as EditText;

            if (target == null)
            {
                return;
            }

            var value = GetFilteredPhoneString(target.Text);

            EditText.TextChanged -= OnTextChanged;
            EditText.Text         = value;
            EditText.SetSelection(EditText.Text.Length);
            EditText.TextChanged += OnTextChanged;

            FireValueChanged(value);
        }
        void OnTextChanged(object sender, global::Android.Text.TextChangedEventArgs textChangedEventArgs)
        {
            var tv = sender as TextView;

            if (tv == null)
            {
                return;
            }

            if (_ignoreNextTextChange)
            {
                _ignoreNextTextChange = false;
                return;
            }

            _ignoreNextTextChange = true;

            ReverseText(tv, textChangedEventArgs.Text.ToString());
        }
Exemple #9
0
 private void EditTextOnTextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     ActualTextGambi = e.Text.ToString();
 }
Exemple #10
0
        private void EditTextSearchLibrary_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
        {
            var searchItem = editTextSearchLibrary.Text;

            adapter.Filter.InvokeFilter(editTextSearchLibrary.Text);
        }
 private void _password_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
 }
 private void _logIn_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
 }
 private void Native_BeforeTextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     TextLengthDifference = e.AfterCount - e.BeforeCount;
 }
Exemple #14
0
 private void TextView_TextChanged(object sender, global::Android.Text.TextChangedEventArgs e)
 {
     fromLayout.Error        = toLayout.Error = null;
     fromLayout.ErrorEnabled = toLayout.ErrorEnabled = false;
 }