this is a screen shot from my android. the text is
I encountered the same problem but with EditText
when used some fonts. My solution works also with TextView
:
Use padding
As TextView
using Canvas.clipRect(float, float, float, float)
in onDraw
method to crop - create custom Canvas
class and override this method (leave it empty).
Next сreate custom TextView
and override two methods onSizeChanged
and onDraw
.
In onSizeChanged
create bitmap with the size of TextView
and our custom Canvas
.
In onDraw
first draw in bitmap by passing our custom Canvas
to method super.onDraw. After that draw bitmap to target сanvas.
More detailed in my answer to the similar question here