private void ConfigurationActivity_OkClick(object sender, EventArgs e) { var prefs = PrefsKeys.GetPrefs(this); var editor = prefs.Edit(); foreach (var colorSetting in _tbColorSettings) { colorSetting.Save(editor, _widgetId); } foreach (var intSetting in _tbIntSettings) { intSetting.Save(editor, _widgetId); } foreach (var boolSetting in _tbBoolSettings) { boolSetting.Save(editor, _widgetId); } editor.Commit(); WidgetsUpdater.Update(this); Intent resultValue = new Intent(); resultValue.PutExtra(AppWidgetManager.ExtraAppwidgetId, _widgetId); SetResult(Result.Ok, resultValue); Finish(); }
public override void OnReceive(Context context, Intent intent) { #if DEBUG Toast.MakeText(context, "Received tap intent!", ToastLength.Short).Show(); #endif var nextAlarm = NextAlarm.ObtainFromSystem(context); nextAlarm.Show(context); WidgetsUpdater.Update(context, nextAlarm); }
public override void OnReceive(Context context, Intent intent) { WidgetsUpdater.Update(context); #if DEBUG _nbCalled++; var toastMessage = string.Format("Received intent! action={0} className={1} nbCalled={2}", intent.Action, intent.Component.ClassName, _nbCalled); Toast.MakeText(context, toastMessage, ToastLength.Long).Show(); #endif }
public override void OnUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { WidgetsUpdater.Update(context, appWidgetIds); }