Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

AppCompatSpinner

open class AppCompatSpinner : Spinner, TintableBackgroundView
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.AdapterView<android.widget.SpinnerAdapter>
   ↳ android.widget.AbsSpinner
   ↳ android.widget.Spinner
   ↳ androidx.appcompat.widget.AppCompatSpinner

A Spinner which supports compatible features on older versions of the platform, including:

This will automatically be used when you use Spinner in your layouts. You should only need to manually use this class when writing custom views.

Summary

Public constructors
<init>(@NonNull context: Context)

Construct a new spinner with the given context's theme.

<init>(@NonNull context: Context, mode: Int)

Construct a new spinner with the given context's theme and the supplied mode of displaying choices.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?)

Construct a new spinner with the given context's theme and the supplied attribute set.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyleAttr: Int)

Construct a new spinner with the given context's theme, the supplied attribute set, and default style attribute.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyleAttr: Int, mode: Int)

Construct a new spinner with the given context's theme, the supplied attribute set, and default style.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyleAttr: Int, mode: Int, popupTheme: Theme!)

Constructs a new spinner with the given context's theme, the supplied attribute set, default styles, popup mode (one of MODE_DIALOG or MODE_DROPDOWN), and the context against which the popup should be inflated.

Public methods
open Int

Get the configured horizontal offset in pixels for the spinner's popup window of choices.

open Int

open Int

open Drawable!

open Context!

open CharSequence!

open Unit

open Parcelable?

open Boolean

open Boolean

open Unit

open Unit
setBackgroundDrawable(@Nullable background: Drawable?)

open Unit
setBackgroundResource(@DrawableRes resId: Int)

open Unit

open Unit

open Unit

open Unit

open Unit
setPopupBackgroundResource(@DrawableRes resId: Int)

open Unit

Protected methods
open Unit

open Unit

open Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

Public constructors

<init>

AppCompatSpinner(@NonNull context: Context)

Construct a new spinner with the given context's theme.

Parameters
context Context: The Context the view is running in, through which it can access the current theme, resources, etc.

<init>

AppCompatSpinner(
    @NonNull context: Context,
    mode: Int)

Construct a new spinner with the given context's theme and the supplied mode of displaying choices. mode may be one of MODE_DIALOG or MODE_DROPDOWN.

Parameters
context Context: The Context the view is running in, through which it can access the current theme, resources, etc.
mode Int: Constant describing how the user will select choices from the spinner.

<init>

AppCompatSpinner(
    @NonNull context: Context,
    @Nullable attrs: AttributeSet?)

Construct a new spinner with the given context's theme and the supplied attribute set.

Parameters
context Context: The Context the view is running in, through which it can access the current theme, resources, etc.
attrs AttributeSet?: The attributes of the XML tag that is inflating the view.

<init>

AppCompatSpinner(
    @NonNull context: Context,
    @Nullable attrs: AttributeSet?,
    defStyleAttr:</