Android.Widget.PopupWindow.SetWindowLayoutMode Method

Syntax

[Android.Runtime.Register("setWindowLayoutMode", "(II)V", "GetSetWindowLayoutMode_IIHandler")]
public virtual void SetWindowLayoutMode (int widthSpec, int heightSpec)

Parameters

widthSpec
an explicit width measure spec mode, either NoType:android/view/ViewGroup$LayoutParams;Href=../../../reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT, NoType:android/view/ViewGroup$LayoutParams;Href=../../../reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT, or 0 to use the absolute width.
heightSpec
an explicit height measure spec mode, either NoType:android/view/ViewGroup$LayoutParams;Href=../../../reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT, NoType:android/view/ViewGroup$LayoutParams;Href=../../../reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT, or 0 to use the absolute height.

Remarks

Change the width and height measure specs that are given to the window manager by the popup. By default these are 0, meaning that the current width or height is requested as an explicit size from the window manager. You can supply NoType:android/view/ViewGroup$LayoutParams;Href=../../../reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT or NoType:android/view/ViewGroup$LayoutParams;Href=../../../reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT to have that measure spec supplied instead, replacing the absolute width and height that has been set in the popup.

If the popup is showing, calling this method will take effect only the next time the popup is shown.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3