次の方法で共有


AppWidgetHostView.UpdateAppWidgetSize Method

Definition

Overloads

UpdateAppWidgetSize(Bundle, IList<SizeF>)

Provide guidance about the size of this widget to the AppWidgetManager.

UpdateAppWidgetSize(Bundle, Int32, Int32, Int32, Int32)

Provide guidance about the size of this widget to the AppWidgetManager.

UpdateAppWidgetSize(Bundle, IList<SizeF>)

Provide guidance about the size of this widget to the AppWidgetManager.

[Android.Runtime.Register("updateAppWidgetSize", "(Landroid/os/Bundle;Ljava/util/List;)V", "GetUpdateAppWidgetSize_Landroid_os_Bundle_Ljava_util_List_Handler", ApiSince=31)]
public virtual void UpdateAppWidgetSize (Android.OS.Bundle newOptions, System.Collections.Generic.IList<Android.Util.SizeF> sizes);
[<Android.Runtime.Register("updateAppWidgetSize", "(Landroid/os/Bundle;Ljava/util/List;)V", "GetUpdateAppWidgetSize_Landroid_os_Bundle_Ljava_util_List_Handler", ApiSince=31)>]
abstract member UpdateAppWidgetSize : Android.OS.Bundle * System.Collections.Generic.IList<Android.Util.SizeF> -> unit
override this.UpdateAppWidgetSize : Android.OS.Bundle * System.Collections.Generic.IList<Android.Util.SizeF> -> unit

Parameters

newOptions
Bundle

The bundle of options, in addition to the size information.

sizes
IList<SizeF>

Sizes, in dips, the widget may be displayed at without calling the provider again. Typically, this will be size of the widget in landscape and portrait. On some foldables, this might include the size on the outer and inner screens.

Attributes

Remarks

Provide guidance about the size of this widget to the AppWidgetManager. The sizes should correspond to the full area the AppWidgetHostView is given. Padding added by the framework will be accounted for automatically.

This method will update the option bundle with the list of sizes and the min/max bounds for width and height.

Java documentation for android.appwidget.AppWidgetHostView.updateAppWidgetSize(android.os.Bundle, java.util.List<android.util.SizeF>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

UpdateAppWidgetSize(Bundle, Int32, Int32, Int32, Int32)

Provide guidance about the size of this widget to the AppWidgetManager.

[Android.Runtime.Register("updateAppWidgetSize", "(Landroid/os/Bundle;IIII)V", "GetUpdateAppWidgetSize_Landroid_os_Bundle_IIIIHandler")]
public virtual void UpdateAppWidgetSize (Android.OS.Bundle? newOptions, int minWidth, int minHeight, int maxWidth, int maxHeight);
[<Android.Runtime.Register("updateAppWidgetSize", "(Landroid/os/Bundle;IIII)V", "GetUpdateAppWidgetSize_Landroid_os_Bundle_IIIIHandler")>]
abstract member UpdateAppWidgetSize : Android.OS.Bundle * int * int * int * int -> unit
override this.UpdateAppWidgetSize : Android.OS.Bundle * int * int * int * int -> unit

Parameters

newOptions
Bundle

The bundle of options, in addition to the size information, can be null.

minWidth
Int32

The minimum width in dips that the widget will be displayed at.

minHeight
Int32

The maximum height in dips that the widget will be displayed at.

maxWidth
Int32

The maximum width in dips that the widget will be displayed at.

maxHeight
Int32

The maximum height in dips that the widget will be displayed at.

Attributes

Remarks

Provide guidance about the size of this widget to the AppWidgetManager. The widths and heights should correspond to the full area the AppWidgetHostView is given. Padding added by the framework will be accounted for automatically. This information gets embedded into the AppWidget options and causes a callback to the AppWidgetProvider. In addition, the list of sizes is explicitly set to an empty list.

This member is deprecated. use AppWidgetHostView#updateAppWidgetSize(Bundle, List) instead.

Java documentation for android.appwidget.AppWidgetHostView.updateAppWidgetSize(android.os.Bundle, int, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

  • <xref:Android.Appwidget.AppWidgetProvider.OnAppWidgetOptionsChanged(Android.Content.Context%2c+Android.Appwidget.AppWidgetManager%2c+Android.Appwidget.AppWidgetManager%2c+Android.Appwidget.AppWidgetManager)>

Applies to