android.appwidget.AppWidgetProvider.onDeleted()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(44)

本文整理了Java中android.appwidget.AppWidgetProvider.onDeleted()方法的一些代码示例,展示了AppWidgetProvider.onDeleted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppWidgetProvider.onDeleted()方法的具体详情如下:
包路径:android.appwidget.AppWidgetProvider
类名称:AppWidgetProvider
方法名:onDeleted

AppWidgetProvider.onDeleted介绍

暂无

代码示例

代码示例来源:origin: aa112901/remusic

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  albumMap.clear();
}

代码示例来源:origin: TUM-Dev/Campus-Android

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  // When the user deletes the widget, delete the associated setting from the database.
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: dabutaizha/juzimi

/**
 * 每删除一次窗口小部件就调用一次
 */
@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: AdleyLong/RecyclerViewDemo

/**
 * 当 Widget 被删除时调用该方法。
 *
 * @param context
 * @param appWidgetIds
 */
@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  Toast.makeText(context, "onDeleted", Toast.LENGTH_SHORT).show();
}

代码示例来源:origin: byhieg/easyweather

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  // 当 widget 被删除时,对应的删除set中保存的widget的id
  for (int appWidgetId : appWidgetIds) {
    idsSet.remove(Integer.valueOf(appWidgetId));
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: Theoneee/DynamicWallpaper

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  Log.e(TAG, "onDeleted(): appWidgetIds.length=" + appWidgetIds.length);
  // 当 widget 被删除时,对应的删除set中保存的widget的id
  for (int appWidgetId : appWidgetIds) {
    idsSet.remove(Integer.valueOf(appWidgetId));
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: nglauber/dominando_android2

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  Intent it = new Intent(context, FavoritosService.class);
  it.putExtra(EXTRA_ACAO, ACAO_EXCLUIR);
  it.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);
  context.startService(it);
}
@Override

代码示例来源:origin: plusonelabs/calendar-widget

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  for (int widgetId : appWidgetIds) {
    InstanceSettings.delete(context, widgetId);
  }
}

代码示例来源:origin: mnnyang/ClassSchedule

/** onDeleted():当 Widget 被删除时调用该方法。 */
@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  LogUtil.d(this, "onDeleted");
}

代码示例来源:origin: ybonnel/TransportsRennes

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  for (int appWidgetId : appWidgetIds) {
    TransportsWidget21Configure.deleteSettings(context, appWidgetId);
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: TUM-Dev/Campus-Android

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  // When the user deletes the widget, delete the associated setting from the database.
  for (int appWidgetId : appWidgetIds) {
    transportController.deleteWidget(appWidgetId);
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: ybonnel/TransportsRennes

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  for (int appWidgetId : appWidgetIds) {
    TransportsWidget21Configure.deleteSettings(context, appWidgetId);
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: ybonnel/TransportsRennes

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  for (int appWidgetId : appWidgetIds) {
    TransportsWidget11Configure.deleteSettings(context, appWidgetId);
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: ybonnel/TransportsRennes

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  for (int appWidgetId : appWidgetIds) {
    TransportsWidget11Configure.deleteSettings(context, appWidgetId);
  }
  super.onDeleted(context, appWidgetIds);
}

代码示例来源:origin: pranavpandey/dynamic-support

@Override
public void onDeleted(@NonNull Context context, @NonNull int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  for (int appWidgetId : appWidgetIds) {
    DynamicAppWidgetUtils.deleteWidgetSettings(getPreferences(), appWidgetId);
  }
}

代码示例来源:origin: er-mo/Android-Battery-Widget

@Override
  public void onDeleted(Context context, int[] widgetIds) {
    super.onDeleted(context, widgetIds);
    if (getNumberOfWidgets(context) == 0) {
      // stop monitoring if there are no more widgets on screen
      context.stopService(new Intent(context, MonitorService.class));
    }
  }
}

代码示例来源:origin: ywwynm/EverythingDone

@Override
  public void onDeleted(Context context, int[] appWidgetIds) {
    super.onDeleted(context, appWidgetIds);
    AppWidgetDAO appWidgetDAO = AppWidgetDAO.getInstance(context);
    for (int appWidgetId : appWidgetIds) {
      appWidgetDAO.delete(appWidgetId);
    }
  }
}

代码示例来源:origin: derry/delion

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  for (int widgetId : appWidgetIds) {
    BookmarkWidgetService.deleteWidgetState(context, widgetId);
  }
  removeOrphanedStates(context);
}

代码示例来源:origin: ywwynm/EverythingDone

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  AppWidgetDAO appWidgetDAO = AppWidgetDAO.getInstance(context);
  for (int appWidgetId : appWidgetIds) {
    appWidgetDAO.delete(appWidgetId);
  }
}

代码示例来源:origin: thuryn/your-local-weather

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
  super.onDeleted(context, appWidgetIds);
  WidgetSettingsDbHelper widgetSettingsDbHelper = WidgetSettingsDbHelper.getInstance(context);
  for (int widgetId: appWidgetIds) {
    widgetSettingsDbHelper.deleteRecordFromTable(widgetId);
  }
}

相关文章