コード例 #1
0
 public override void SetText(Java.Lang.ICharSequence text, TextView.BufferType type)
 {
     base.SetText(text, type);
     if (text != null && text.Length() > 0)
     {
         SetSelection(text.Length());
     }
 }
コード例 #2
0
        private void AddTextView(string text, TextView.BufferType bufferType, TableRow tr)
        {
            TextView textView = new TextView(this);

            textView.SetPadding(5, 5, 5, 5);
            textView.SetText(text, bufferType);
            tr.AddView(textView);
        }
コード例 #3
0
        public static TargetItemBinding <TextView, string> SetTextBinding(
            this IItemReference <TextView> textViewReference,
            TextView.BufferType bufferType)
        {
            if (textViewReference == null)
            {
                throw new ArgumentNullException(nameof(textViewReference));
            }
            if (bufferType == null)
            {
                throw new ArgumentNullException(nameof(bufferType));
            }

            return(new TargetItemOneWayCustomBinding <TextView, string>(
                       textViewReference,
                       (textView, text) => textView.SetText(text, bufferType),
                       () => $"{nameof(TextView.SetText)}"));
        }