Closed aleksandra-majchrzak closed 5 years ago
Ok, I've just found that paints rensponsible for text display have protected acces. Heaven bless you for that :D I inherited PinEntryEditText class, set typeface to the paints, and it works now.
Also, it extends AppComaptTextView, so it should be possible to set the typefaces. I made this widget when Calligraphy was the standard for doing this. Making things protected was a backup sticking with SOLID principles. I'll take a look, honestly the paint object from the textview should be used so in theory you should be able to set the typefaces the same as in any TextView.
Samples will be added in the master branch on how to make this work.
I'm using PinEntryEditText, and it has been great so far. The only feature I miss is the ability to set custom font family to the PinEntryEditText content. I tried setting it via android:fontFamily property in XML, and inheriting PinEntryEditText to set the typeface in Java code, but neither of these ideas work.
Is there any option to change PinEntryEditText font family?