Пример #1
0
        override public void OnAppWidgetOptionsChanged(Context context,
                                                       AppWidgetManager appWidgetManager,
                                                       int appWidgetId,
                                                       Bundle newOptions)
        {
            RemoteViews layout = RemoteViewsFactory.CreateLayout(context, appWidgetId, newOptions);

            appWidgetManager.UpdateAppWidget(appWidgetId, layout);
        }
Пример #2
0
        override public void OnUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds)
        {
            // Update each of the widgets with the remote adapter
            foreach (int id in appWidgetIds)
            {
                RemoteViews layout = null;

                Bundle options = appWidgetManager.GetAppWidgetOptions(id);
                layout = RemoteViewsFactory.CreateLayout(context, id, options);


                appWidgetManager.UpdateAppWidget(id, layout);
            }

            base.OnUpdate(context, appWidgetManager, appWidgetIds);
        }