ThemedSpinnerAdapter

interface ThemedSpinnerAdapter : SpinnerAdapter


An extension of SpinnerAdapter that is capable of inflating drop-down views against a different theme than normal views.

Classes that implement this interface should use the theme provided to setDropDownViewTheme when creating views in getDropDownView.

The Helper class is provided to aide implementation in a backwards compatible way.

Summary

Nested types

A helper class which allows easy integration of ThemedSpinnerAdapter into existing SpinnerAdapters in a backwards compatible way.

Public functions

Resources.Theme?

Returns the value previously set by a call to setDropDownViewTheme.

Unit

Sets the Resources.Theme against which drop-down views are inflated.

Inherited Constants

From android.widget.Adapter
const Int
const Int
NO_SELECTION = -2147483648

Public functions

getDropDownViewTheme

Added in 1.1.0
fun getDropDownViewTheme(): Resources.Theme?

Returns the value previously set by a call to setDropDownViewTheme.

Returns
Resources.Theme?

the Resources.Theme against which drop-down views are inflated, or null if one has not been explicitly set

setDropDownViewTheme

Added in 1.1.0
fun setDropDownViewTheme(theme: Resources.Theme?): Unit

Sets the Resources.Theme against which drop-down views are inflated.

Parameters
theme: Resources.Theme?

the context against which to inflate drop-down views, or null to use the default theme

See also
getDropDownView