0

How to implement a TypeFace in a TextView in java more with the following criteria:

This change will occur at the touch of a button. When this button is pressed, the following letters entered will receive the changes without changing the previous ones.

When selecting a BOLD button at a certain time of the user's writing:

"This is an example (Button has been pressed now) now the letters are bold (Button has been pressed again) and now they have returned to their normal pattern."

I would like the logic of the Typeface to use the button. my current solution does not meet the specified: descriptionField.setTypeface(Typeface.create ((String) null, Typeface.NORMAL)); it ends up modifying all the letters that are in the TextView, but my intention was to make it change only the next words typed by the user

Syed Rafaqat Hussain
  • 1,009
  • 1
  • 9
  • 33
  • I assume you want to change only some letters or a series of words, check this: https://stackoverflow.com/questions/12002305/changing-font-of-first-letter-in-android – Darshan Feb 01 '21 at 05:40
  • I'll check it out, but my need would be to change the text style with bold for example anytime the user presses a button and with any word – Fernando Amaral Feb 01 '21 at 07:08

0 Answers0