How to implement custom font to Android home screen widget after June/July security update?

Viewed 298

After the last June (for Google Pixels) / June (for Samsung phones) the android:fontFamily attribute for the remoteViews doesn't work anymore. Google answer to my query is that it is intended behaviour for security reasons.

I've tried to use:

  • downloaded fonts, both methods as a file and as an XML file with a link to Google Fonts,
  • new class CustomTextView extends TextView and use it in an XML file,

BUT none of the methods works.

Can anyone enlight me on what method I need to use to be able to use a custom font in TextView in Android home screen widgets, please?

Regards Adam

0 Answers
Related