protected void SetTextFormatted(RemoteViews view, int resourceId, string text, bool isAlerted)
        {
            if (!string.IsNullOrEmpty(text) && isAlerted)
            {
                var spannable = new SpannableString(text);
                spannable.SetSpan(new UnderlineSpan(), 0, text.Length, SpanTypes.ExclusiveExclusive);
                view.SetCharSequence(resourceId, "setText", spannable);
                return;
            }

            view.SetTextViewText(resourceId, text ?? string.Empty);
        }
Esempio n. 2
0
 private void SetClockProperties(RemoteViews view, int id, ICharSequence spannable)
 {
     view.SetCharSequence(id, "setFormat12Hour", spannable);
     view.SetCharSequence(id, "setFormat24Hour", spannable);
 }