public static void SetTextUnderline(this Android.Widget.TextView textView, int resId) { Guard.ThrowIfNull(textView, nameof(textView)); textView.SetText(resId); var span = new SpannableString(textView.Text); span.SetSpan(new UnderlineSpan(), 0, textView.Text.Length, 0); textView.SetText(span, TextView.BufferType.Spannable); }