0

I have an Edit Text with a fixed dimension on the screen, and when I change the font it can push a part of the text in the next row. It's like in these pictures:

Initial text with default font

Same Text with same text size, but different typeface

How can I adjust the text size of the second picture so that the same text stays in the same lines after changing the font?

EDIT:

For example in the first picture there is "abcdefghijklmopqrst" in the first row and "uvwxyz" in the second row. But when a user changes a font by clicking on it in a recyclerview, this is called: editText.setTypeface(font). After the font change in the second picture there is "abcdefghijk" in the first row, "lmnopqrst" in the second row and "uvwxyz" in the third row.

So my question is how can my app dynamically change the text size so when the user selects the second font the text in the EditText stays the same. ("abcdefghijklmopqrst" in the first row and "uvwxyz" in the second row from the example above).

Aleksakb24
  • 51
  • 3

0 Answers0