找到了答案。调用后,
remoteViews.setTextViewText您需要通过调用来更新窗口小部件
updateAppWidget。我添加的代码如下所示。
AppWidgetManager manager = AppWidgetManager.getInstance(context);manager.updateAppWidget(thisWidget, remoteViews);

找到了答案。调用后,
remoteViews.setTextViewText您需要通过调用来更新窗口小部件
updateAppWidget。我添加的代码如下所示。
AppWidgetManager manager = AppWidgetManager.getInstance(context);manager.updateAppWidget(thisWidget, remoteViews);