public interface ThemedSpinnerAdapter extends SpinnerAdapter
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.
Modifier and Type | Interface and Description |
---|---|
static class |
ThemedSpinnerAdapter.Helper
A helper class which allows easy integration of
ThemedSpinnerAdapter into existing
SpinnerAdapter s in a backwards compatible way. |
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Modifier and Type | Method and Description |
---|---|
Resources.Theme |
getDropDownViewTheme()
Returns the value previously set by a call to
#setDropDownViewTheme(Theme) . |
void |
setDropDownViewTheme(Resources.Theme theme)
Sets the
Resources.Theme against which drop-down views are
inflated. |
getDropDownView
getCount, getItem, getItemId, getItemViewType, getView, getViewTypeCount, hasStableIds, isEmpty, registerDataSetObserver, unregisterDataSetObserver
void setDropDownViewTheme(@Nullable Resources.Theme theme)
Resources.Theme
against which drop-down views are
inflated.theme
- the context against which to inflate drop-down views, or
null
to use the default themeSpinnerAdapter.getDropDownView(int, View, ViewGroup)
@Nullable Resources.Theme getDropDownViewTheme()
#setDropDownViewTheme(Theme)
.Resources.Theme
against which drop-down views are
inflated, or null
if one has not been explicitly set