Back to project page android_Findex.
The source code is released under:
Apache License
If you think the Android project android_Findex listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lithidsw.findex.widget; //from w w w . j a v a 2 s . com import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Context; import com.lithidsw.findex.R; import com.lithidsw.findex.db.DBUtils; public class WidgetUtils { public static void update(Context context) { AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); if (appWidgetManager != null) { if (new DBUtils(context).getWidgetCount() > 0) { ComponentName name = new ComponentName(context, WidgetProvider.class); int[] appWidgetIds = appWidgetManager.getAppWidgetIds(name); appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.list_view); } } } }