ThemedSpinnerAdapter
interface ThemedSpinnerAdapter : 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 Helper
class is provided to aide implementation in a backwards compatible way.
Summary
Nested classes | |
---|---|
A helper class which allows easy integration of |
Public methods | |
---|---|
abstract Theme? |
Returns the value previously set by a call to |
abstract Unit |
setDropDownViewTheme(@Nullable theme: Theme?) Sets the |
Public methods
getDropDownViewTheme
@Nullable abstract fun getDropDownViewTheme(): Theme?
Returns the value previously set by a call to setDropDownViewTheme(Theme)
.
Return | |
---|---|
Theme? |
the Resources.Theme against which drop-down views are inflated, or null if one has not been explicitly set |
setDropDownViewTheme
abstract fun setDropDownViewTheme(@Nullable theme: Theme?): Unit
Sets the Resources.Theme
against which drop-down views are inflated.
Parameters | |
---|---|
theme |
Theme?: the context against which to inflate drop-down views, or null to use the default theme |