示例#1
0
        /// <summary>
        /// Since they are several over write of the Test property during layout we have to set this field as long as it is not definitly set
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void nativeBtn_AfterTextChanged(object sender, AfterTextChangedEventArgs e)
        {
            ISpannable spannable = e.Editable;
            var        indice    = spannable.ToString().IndexOf(_iconButton.Icon);
            var        spans     = spannable.GetSpans(indice, indice + _iconButton.Icon.Length, Java.Lang.Class.FromType(typeof(TypefaceSpan))).ToList();

            if (spans.Count == 0)
            {
                _nativeBtn.SetText(_iconSpan, TextView.BufferType.Spannable);
            }
        }