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

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

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

AppWidgetProvider.onDisabled介绍

暂无

代码示例

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

public void onDisabled(Context context) {
  Log.e(TAG,"ondisable = " + isInUse);
  super.onDisabled(context);
  isInUse = false;
  Log.e(TAG,"ondisable = " + isInUse);
}

代码示例来源:origin: ankidroid/Anki-Android

@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
  Timber.d("SmallWidget: Widget disabled");
  SharedPreferences preferences = AnkiDroidApp.getSharedPrefs(context);
  preferences.edit().putBoolean("widgetSmallEnabled", false).commit();
  UsageAnalytics.sendAnalyticsEvent(this.getClass().getSimpleName(), "disabled");
}

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

/**
 * 当最后一个该窗口小部件删除时调用该方法
 */
@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
}

代码示例来源:origin: zfman/hputimetable

@Override
  public void onDisabled(Context context) {
    // Enter relevant functionality for when the last widget is disabled
    super.onDisabled(context);
  }
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

@Override
public void onDisabled(Context context) {
  // Called once the last instance of your widget is removed from the
  // homescreen
  super.onDisabled(context);
}

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

/**
 * 与 onEnabled 恰好相反,当你的最后一个 Widget 被删除时调用该方法,所以这里用来清理之前在 onEnabled() 中进行的操作。
 *
 * @param context
 */
@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

@Override
public void onDisabled(Context context)
{
  // Called once the last instance of your widget is removed from the
  // homescreen
  super.onDisabled(context);
}

代码示例来源:origin: bparmentier/OpenBikeSharing

@Override
public void onDisabled(Context context) {
  // Enter relevant functionality for when the last widget is disabled
  super.onDisabled(context);
}

代码示例来源:origin: martykan/forecastie

@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
  Log.d(this.getClass().getSimpleName(), "Disable updates for this widget");
  cancelUpdate(context);
}

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

@Override
public void onDisabled(Context context) {
  // 在最后一个 widget 被删除时,终止服务
  context.stopService(new Intent(context,WeatherWidgetService.class));
  super.onDisabled(context);
}

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

@Override
public void onDisabled(Context context) {
  Log.e(TAG, "onDisabled");
  // 在最后一个 widget 被删除时,终止服务
  SERVICE_INTENT.setPackage("com.theone.dynamicwallpaper");
  context.stopService(SERVICE_INTENT);
  super.onDisabled(context);
}

代码示例来源:origin: eliotstocker/Light-Controller

public void onDisabled(Context context) {
  super.onDisabled(context);
  context.stopService(new Intent(context,
      ClockUpdateService.class));
}
/**

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

@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
  context.stopService(new Intent(context, FavoritosService.class));
}
private void configuraClickBotoes(Context context, int appWidgetId, RemoteViews views) {

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

@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
  removeOrphanedStates(context);
}

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

/**
 * 与 onEnabled 恰好相反,当你的最后一个 Widget 被删除时调用该方法,
 * 所以这里用来清理之前在 onEnabled() 中进行的操作。
 */
@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
  LogUtil.d(this, "onDisabled");
  AppUtils.cancelUpdateWidgetService(context.getApplicationContext());
}

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

@Override
public void onDisabled(Context context) {
  LOG_YBO.debug("onDisable");
  TransportsWidget21Configure.deleteAllSettings(context);
  super.onDisabled(context);
}

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

@Override
public void onDisabled(Context context) {
  LOG_YBO.debug("onDisable");
  TransportsWidget21Configure.deleteAllSettings(context);
  super.onDisabled(context);
}

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

@Override
public void onDisabled(Context context) {
  LOG_YBO.debug("onDisable");
  TransportsWidget11Configure.deleteAllSettings(context);
  super.onDisabled(context);
}

代码示例来源:origin: qqq3/good-weather

@Override
public void onDisabled(Context context) {
  super.onDisabled(context);
  AppWidgetProviderAlarm appWidgetProviderAlarm =
      new AppWidgetProviderAlarm(context, LessWidgetProvider.class);
  appWidgetProviderAlarm.cancelAlarm();
}

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

@Override
public void onDisabled(Context context) {
  LOG_YBO.debug("onDisable");
  TransportsWidgetConfigure.deleteAllSettings(context);
  super.onDisabled(context);
}

相关文章