Created
November 14, 2015 17:04
-
-
Save theyann/210f0d1b92802abc1aaa to your computer and use it in GitHub Desktop.
AppWidgetProvider for configurable widget, onDelete example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onDeleted(Context context, int[] appWidgetIds) { | |
super.onDeleted(context, appWidgetIds); | |
WidgetEntryDao dao = new WidgetEntryDao(new DbHelper(context)); | |
final int N = appWidgetIds.length; | |
for (int i = 0; i < N; i++) { | |
dao.deleteByWidgetId(appWidgetIds[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment