Reputation: 1582
I have a TextView title. I need it showing half of text bold and other half not bold. The way I set it is shown below:
category.getName() -- > Bold "urinary tract infection" ---->not bold
title.setText(category.getName()+ "\n(urinary tract infection)");
How do I achieve this?
Upvotes: 2
Views: 231
Reputation: 522
You can try formatting you TextView using HTML.
title.setText(Html.fromHtml("<b>"+category.getName()+ "</b>\n(urinary tract infection)"));
Upvotes: 2