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?

4

1 回答 1

0

App Widget 布局基于RemoteViews,不支持所有类型的布局或视图小部件。它们确实支持一些 Android 小部件,包括TextView. 但是,不支持这些类的后代。(参考:http: //developer.android.com/guide/topics/appwidgets/index.html

相反,您可能想试试这个:Problemshowing time using custom font

于 2013-04-17T11:17:37.797 回答