added in version 1.0.0
belongs to Maven artifact androidx.appcompat:appcompat:1.0.0-beta01

ThemedSpinnerAdapter

public interface ThemedSpinnerAdapter
implements SpinnerAdapter

androidx.appcompat.widget.ThemedSpinnerAdapter


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(Theme) when creating views in SpinnerAdapter.getDropDownView(int, View, ViewGroup).

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

Summary

Nested classes

class ThemedSpinnerAdapter.Helper

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

Inherited constants

Public methods

abstract Resources.Theme getDropDownViewTheme()

Returns the value previously set by a call to setDropDownViewTheme(Theme).

abstract void setDropDownViewTheme(Resources.Theme theme)

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

Inherited methods

Public methods

getDropDownViewTheme

added in version 1.0.0
public abstract Resources.Theme getDropDownViewTheme ()

Returns the value previously set by a call to setDropDownViewTheme(Theme).

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 version 1.0.0
public abstract void setDropDownViewTheme (Resources.Theme theme)

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