I have a question about widgets in android. I've created a simple digital clock with appWidgetProvider using TextClock. My question is if there's an option to use a custom font for TextClock. I used android: fontfamily, but i don't want to use default fonts.
Asked
Active
Viewed 998 times
-2
-
If TextClock is the subclass of TextView then you can use it. Please check and update the post – Mohammed Rampurawala Sep 09 '17 at 10:51
-
Check this out https://youtu.be/7kD0ZYzJbYo – cutiko Sep 09 '17 at 11:13
-
The answer I found when looking at this previously was using Bitmap and drawing text with custom typeface into it. In my case, I have decided to just forget about custom font on a widget, as the fonts were not essential for me at the time. However, it is something you could look at. https://stackoverflow.com/a/4411060/1615525 – sigute Sep 09 '17 at 12:30
1 Answers
0
Your issue is not strictly with TextClock
. You have no way to configure a RemoteViews
to use a custom Typeface
for anything, let alone a TextClock
.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491