Condividi tramite


Spinner.DropDownWidth Property

Definition

Get the configured width of the spinner's popup window of choices in pixels. -or- Set the width of the spinner's popup window of choices in pixels.

public virtual int DropDownWidth { [Android.Runtime.Register("getDropDownWidth", "()I", "GetGetDropDownWidthHandler")] get; [Android.Runtime.Register("setDropDownWidth", "(I)V", "GetSetDropDownWidth_IHandler")] set; }
[<get: Android.Runtime.Register("getDropDownWidth", "()I", "GetGetDropDownWidthHandler")>]
[<set: Android.Runtime.Register("setDropDownWidth", "(I)V", "GetSetDropDownWidth_IHandler")>]
member this.DropDownWidth : int with get, set

Property Value

Width in pixels, WRAP_CONTENT, or MATCH_PARENT

Attributes

Remarks

Property getter documentation:

Get the configured width of the spinner's popup window of choices in pixels. The returned value may also be android.view.ViewGroup.LayoutParams#MATCH_PARENT meaning the popup window will match the width of the Spinner itself, or android.view.ViewGroup.LayoutParams#WRAP_CONTENT to wrap to the measured size of contained dropdown list items.

Java documentation for android.widget.Spinner.getDropDownWidth().

Property setter documentation:

Set the width of the spinner's popup window of choices in pixels. This value may also be set to android.view.ViewGroup.LayoutParams#MATCH_PARENT to match the width of the Spinner itself, or android.view.ViewGroup.LayoutParams#WRAP_CONTENT to wrap to the measured size of contained dropdown list items.

Only valid in #MODE_DROPDOWN; this method is a no-op in other modes.

Java documentation for android.widget.Spinner.setDropDownWidth(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.

Applies to