Skip to content

Most visited

Recently visited

navigation

ThemedSpinnerAdapter

public interface ThemedSpinnerAdapter
implements SpinnerAdapter

android.support.v7.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 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

From interface android.widget.Adapter

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

From interface android.widget.SpinnerAdapter
From interface android.widget.Adapter

Public methods

getDropDownViewTheme

added in version 24.2.0
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 24.2.0
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

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)