0

Is there any way to do what is shown in the design? I mean, have some text at the beginning of the TextView with a different style and the rest of text aligned to the left.

enter image description here

I have tried with this, but no luck.

SpannableString text = new SpannableString("02:32 PM Resolving Workflow Issues with Partners");

text.setSpan(new TextAppearanceSpan(getApplicationContext(), R.style.grey_background_white_text_color_style),
             0,
             8,
             Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

textview.setText(text, TextView.BufferType.SPANNABLE);
David
  • 901
  • 1
  • 13
  • 37
  • 1
    You can use your custom view, which may contain two text views. You can set different style using typeface on the custom view – AnswerDroid Jun 12 '15 at 11:55
  • @AndroidLearner I don't remember I had written anything about any custom view :s Anyway, can you show me an example regarding your answer? – David Jun 17 '15 at 07:56

0 Answers0