private string GetFormatted(ICharSequence s) { var text = new string(s.ToArray()); if (string.IsNullOrWhiteSpace(text)) { return(text); } try { var money = decimal.Parse(new Regex("[.,]").Replace(text, "")); if (money > 0m) { text = (money / 100).ToString("F2"); } } catch { text = string.Empty; } return(text); }
public override void SetText(ICharSequence text, BufferType type) { SpannableString s = GetTextWithImages(Context, new Java.Lang.String(text.ToArray(), 0, text.Count())); base.SetText(s, BufferType.Spannable); }