Just build your String in HTML and set it:
String sourceString = "<b>" + id + "</b> " + name;
mytextview.setText(Html.fromHtml(sourceString));
More Related Contents:
- How to retrieve and display data from a database to TextView
- How to set the text color of TextView in code?
- Set style for TextView programmatically
- How to put a border around an Android TextView?
- Single TextView with multiple colored text
- How to add a TextView to a LinearLayout dynamically in Android?
- Android – Set text to TextView
- How to add a line break in an Android TextView?
- Place 2 textview beside each other with 2nd textview always visible
- Shadow Effect for a Text in Android?
- Android Spanned, SpannedString, Spannable, SpannableString and CharSequence
- Android setting with TextView for Hebrew text?
- Programmatically set left drawable in a TextView
- How to get number of lines of TextView?
- Android: Last line of textview cut off
- Android – Add textview to layout when button is pressed
- Display all Unicode chars in TextView
- Placing a textview on top of imageview in android
- How to bring view in front of everything?
- How to use textview.getLayout()? It returns null
- How do I enable standard copy paste for a TextView in Android?
- Which HTML tags are supported by Android TextView?
- How to remove the top and bottom space on textview of Android
- How to set a ripple effect on textview or imageview on Android?
- Android active link of url in TextView
- How to adjust text kerning in Android TextView?
- android: html in textview with link clickable [duplicate]
- Changing font size into an AlertDialog
- Copy text from TextView on Android
- How to change a TextView’s text by pressing a Button