0

I am trying to use a custom font for my app, and have the XML layout use this custom font. I followed the instructions listed here, but the problem is that I get the following crash:

W/AppWidgetHostView(  519): updateAppWidget couldn't find any view, using error view
W/AppWidgetHostView(  519): android.view.InflateException: Binary XML file line #63: Error inflating class com.example.RobotoTextView

Because this is running inside an AppWidgetProvider, I wonder if it is going to work. Maybe there is a work around (except going through each widget ID and changing the typeface in Java) please. Any clue?

Community
  • 1
  • 1
user1777907
  • 1,355
  • 4
  • 12
  • 28

1 Answers1

0

App Widget layouts are based on RemoteViews, which do not support every kind of layout or view widget. They do support some Android widgets, including TextView. However, descendants of these classes are not supported. (Reference: http://developer.android.com/guide/topics/appwidgets/index.html)

Instead you might want to try this: Problem showing time using custom font

Community
  • 1
  • 1
Catalin Morosan
  • 7,897
  • 11
  • 53
  • 73