private void SetText(UILabel label, UIFont font, RoubleType type)
        {
            char roubleSym = Roubles.GetRoubleSymbFor (type);

            NSMutableAttributedString attrString = new NSMutableAttributedString();
            attrString.Append(new NSAttributedString(Text, font: font, foregroundColor: UIColor.Black));
            attrString.Append(new NSAttributedString(roubleSym.ToString(), font: _roubleFont, foregroundColor: UIColor.Black));

            label.AttributedText = attrString;
        }
Beispiel #2
0
 public static void SetTextWithRouble(this TextView label, string text, RoubleType roubleType)
 {
     var textFormatted = new SpannableString(text + Roubles.GetRoubleSymbFor(roubleType));
     textFormatted.SetSpan(RoubleSpan, textFormatted.Length() - 1, textFormatted.Length(), SpanTypes.ExclusiveExclusive);
     label.TextFormatted = textFormatted;
 }
Beispiel #3
0
 public static char GetRoubleSymbFor(RoubleType type)
 {
     return _roubleSymbols[type];
 }