- Forum posts: 77
Aug 19, 2016, 11:04:41 AM via Website
Aug 19, 2016 11:04:41 AM via Website
How to add text format like bold, italics , strong in textView???
Aug 19, 2016, 11:04:41 AM via Website
Aug 19, 2016 11:04:41 AM via Website
How to add text format like bold, italics , strong in textView???
Sep 23, 2016, 1:54:47 PM via Website
Sep 23, 2016 1:54:47 PM via Website
use typrface attribute
Sep 23, 2016, 2:25:19 PM via Website
Sep 23, 2016 2:25:19 PM via Website
Thanks..
Sep 27, 2016, 8:18:39 AM via Website
Sep 27, 2016 8:18:39 AM via Website
more easy if you use on XML,
android:textStyle="bold"
Oct 1, 2016, 5:56:50 AM via Website
Oct 1, 2016 5:56:50 AM via Website
If you need more complex formating to do from code use SpannableString
S
pannableString text = new SpannableString(textToColor);
ForegroundColorSpan colorSpan = new ForegroundColorSpan(color);
text.setSpan(colorSpan, 0, text.length(), 0);`
here text color is changed.
Oct 1, 2016, 12:09:36 PM via Website
Oct 1, 2016 12:09:36 PM via Website
Shortcut to your work is Ctrl + B
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.