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

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

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

AppWidgetProvider.onAppWidgetOptionsChanged介绍

暂无

代码示例

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

/**
 * 当小部件大小改变时
 */
@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

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

/**
 * 当 Widget 第一次被添加或者大小发生变化时调用该方法,可以在此控制 Widget 元素的显示和隐藏。
 *
 * @param context
 * @param appWidgetManager
 * @param appWidgetId
 * @param newOptions
 */
@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

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

@Override
public void onAppWidgetOptionsChanged(Context context,
                   AppWidgetManager appWidgetManager, int appWidgetId,
                   Bundle newOptions) {
  Log.e(TAG, "onAppWidgetOptionsChanged");
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId,
      newOptions);
}

代码示例来源:origin: udacity/AdvancedAndroid_MyGarden

@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager,
                   int appWidgetId, Bundle newOptions) {
  PlantWateringService.startActionUpdatePlantWidgets(context);
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

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

/**
   * 当 Widget 第一次被添加或者大小发生变化时调用该方法,
   * 可以在此控制 Widget 元素的显示和隐藏。
   */
  @Override
  public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
    super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
    LogUtil.d(this, "onAppWidgetOptionsChanged");

  }
}

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

@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
  onUpdate(context, appWidgetManager, new int[]{appWidgetId});
  // Obtain appropriate widget and update it.
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

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

@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions)
{
  onUpdate(context, appWidgetManager, new int[]{appWidgetId});
  // Obtain appropriate widget and update it.
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

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

@Override
public void onAppWidgetOptionsChanged(@NonNull Context context,
    @NonNull AppWidgetManager appWidgetManager, int appWidgetId,
    @NonNull Bundle newOptions) {
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
  appWidgetManager.updateAppWidget(appWidgetId, getRemoteViews(context));
  updateAppWidget(context, appWidgetManager, appWidgetId);
}

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

@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
  RemoteViews remoteViews = new RemoteViews(context.getPackageName(),
      R.layout.control_widget_init);
  Log.d("widget", "Get Widget Size");
  updateUI(context, appWidgetManager);
  appWidgetManager.updateAppWidget(appWidgetId, remoteViews);
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

代码示例来源:origin: xRoker/GHCWidget

@Override
public void onAppWidgetOptionsChanged(Context context,
                   AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
  resized = true;
  updateWidget(context);
  setClickIntent(context, appWidgetId);
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
}

代码示例来源:origin: SecUSo/privacy-friendly-pedometer

@Override
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
  RemoteViews rv = getRemoteViews(context, newOptions);
  appWidgetManager.updateAppWidget(appWidgetId, rv);
  super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
  forceWidgetUpdate(appWidgetId, context);
}

代码示例来源:origin: AEFeinstein/mtg-familiar

Bundle newOptions) {
setLayout();
super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);

相关文章