共用方式為


PopupWindow.AttachedInDecor Property

Definition

Indicates whether the popup window will be attached in the decor frame of its parent window. -or- This will attach the popup window to the decor frame of the parent window to avoid overlaping with screen decorations like the navigation bar.

public virtual bool AttachedInDecor { [Android.Runtime.Register("isAttachedInDecor", "()Z", "GetIsAttachedInDecorHandler", ApiSince=22)] get; [Android.Runtime.Register("setAttachedInDecor", "(Z)V", "GetSetAttachedInDecor_ZHandler", ApiSince=22)] set; }
[<get: Android.Runtime.Register("isAttachedInDecor", "()Z", "GetIsAttachedInDecorHandler", ApiSince=22)>]
[<set: Android.Runtime.Register("setAttachedInDecor", "(Z)V", "GetSetAttachedInDecor_ZHandler", ApiSince=22)>]
member this.AttachedInDecor : bool with get, set

Property Value

true if the window will be attached to the decor frame of its parent window.

Attributes

Remarks

Property getter documentation:

Indicates whether the popup window will be attached in the decor frame of its parent window.

Java documentation for android.widget.PopupWindow.isAttachedInDecor().

Property setter documentation:

This will attach the popup window to the decor frame of the parent window to avoid overlaping with screen decorations like the navigation bar. Overrides the default behavior of the flag WindowManager.LayoutParams#FLAG_LAYOUT_ATTACHED_IN_DECOR.

By default the flag is set on SDK version Build.VERSION_CODES#LOLLIPOP_MR1 or greater and cleared on lesser SDK versions.

Java documentation for android.widget.PopupWindow.setAttachedInDecor(boolean).

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