public abstract class BaseDrawerItem<T,VH extends android.support.v7.widget.RecyclerView.ViewHolder> extends AbstractDrawerItem<T,VH> implements Nameable<T>, Iconable<T>, Tagable<T>, Typefaceable<T>
| Modifier and Type | Field and Description |
|---|---|
protected android.util.Pair<java.lang.Integer,android.content.res.ColorStateList> |
colorStateList |
protected ColorHolder |
disabledIconColor |
protected ColorHolder |
disabledTextColor |
protected ImageHolder |
icon |
protected ColorHolder |
iconColor |
protected boolean |
iconTinted |
protected int |
level |
protected StringHolder |
name |
protected ColorHolder |
selectedColor |
protected ImageHolder |
selectedIcon |
protected ColorHolder |
selectedIconColor |
protected ColorHolder |
selectedTextColor |
protected ColorHolder |
textColor |
protected android.graphics.Typeface |
typeface |
mEnabled, mIdentifier, mOnDrawerItemClickListener, mOnPostBindViewListener, mSelectable, mSelected, mSubItems, mTag| Constructor and Description |
|---|
BaseDrawerItem() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
getColor(android.content.Context ctx)
helper method to decide for the correct color
|
ColorHolder |
getDisabledIconColor() |
ColorHolder |
getDisabledTextColor() |
ImageHolder |
getIcon() |
ColorHolder |
getIconColor() |
int |
getIconColor(android.content.Context ctx)
helper method to decide for the correct color
|
int |
getLevel() |
StringHolder |
getName() |
ColorHolder |
getSelectedColor() |
protected int |
getSelectedColor(android.content.Context ctx)
helper method to decide for the correct color
|
ImageHolder |
getSelectedIcon() |
ColorHolder |
getSelectedIconColor() |
protected int |
getSelectedIconColor(android.content.Context ctx)
helper method to decide for the correct color
|
ColorHolder |
getSelectedTextColor() |
protected int |
getSelectedTextColor(android.content.Context ctx)
helper method to decide for the correct color
|
ColorHolder |
getTextColor() |
protected android.content.res.ColorStateList |
getTextColorStateList(int color,
int selectedTextColor)
helper to get the ColorStateList for the text and remembering it so we do not have to recreate it all the time
|
android.graphics.Typeface |
getTypeface() |
boolean |
isIconTinted() |
T |
withDisabledIconColor(int disabledIconColor) |
T |
withDisabledIconColorRes(int disabledIconColorRes) |
T |
withDisabledTextColor(int disabledTextColor) |
T |
withDisabledTextColorRes(int disabledTextColorRes) |
T |
withIcon(android.graphics.drawable.Drawable icon) |
T |
withIcon(com.mikepenz.iconics.typeface.IIcon iicon) |
T |
withIcon(ImageHolder icon) |
T |
withIcon(int iconRes) |
T |
withIconColor(int iconColor) |
T |
withIconColorRes(int iconColorRes) |
T |
withIconTinted(boolean iconTinted)
Deprecated.
|
T |
withIconTintingEnabled(boolean iconTintingEnabled)
will tint the icon with the default (or set) colors
(default and selected state)
|
T |
withLevel(int level) |
T |
withName(int nameRes) |
T |
withName(java.lang.String name) |
T |
withName(StringHolder name) |
T |
withSelectedColor(int selectedColor) |
T |
withSelectedColorRes(int selectedColorRes) |
T |
withSelectedIcon(android.graphics.drawable.Drawable selectedIcon) |
T |
withSelectedIcon(int selectedIconRes) |
T |
withSelectedIconColor(int selectedIconColor) |
T |
withSelectedIconColorRes(int selectedColorRes) |
T |
withSelectedTextColor(int selectedTextColor) |
T |
withSelectedTextColorRes(int selectedColorRes) |
T |
withTextColor(int textColor) |
T |
withTextColorRes(int textColorRes) |
T |
withTintSelectedIcon(boolean iconTinted)
Deprecated.
|
T |
withTypeface(android.graphics.Typeface typeface) |
equals, equals, equals, generateView, generateView, getFactory, getIdentifier, getOnDrawerItemClickListener, getOnPostBindViewListener, getSubItems, getTag, getViewHolder, hashCode, isEnabled, isExpanded, isSelectable, isSelected, onPostBindView, withEnabled, withIdentifier, withIsExpanded, withOnDrawerItemClickListener, withPostOnBindViewListener, withSelectable, withSetSelected, withSubItems, withSubItems, withTagclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetTag, withTagbindView, getLayoutRes, getTypeprotected ImageHolder icon
protected ImageHolder selectedIcon
protected StringHolder name
protected boolean iconTinted
protected ColorHolder selectedColor
protected ColorHolder textColor
protected ColorHolder selectedTextColor
protected ColorHolder disabledTextColor
protected ColorHolder iconColor
protected ColorHolder selectedIconColor
protected ColorHolder disabledIconColor
protected android.graphics.Typeface typeface
protected android.util.Pair<java.lang.Integer,android.content.res.ColorStateList> colorStateList
protected int level
public T withIcon(ImageHolder icon)
public T withIcon(android.graphics.drawable.Drawable icon)
public T withIcon(@DrawableRes int iconRes)
public T withSelectedIcon(android.graphics.drawable.Drawable selectedIcon)
public T withSelectedIcon(@DrawableRes int selectedIconRes)
public T withIcon(com.mikepenz.iconics.typeface.IIcon iicon)
public T withName(StringHolder name)
public T withSelectedColor(int selectedColor)
public T withSelectedColorRes(@ColorRes int selectedColorRes)
public T withTextColor(int textColor)
public T withTextColorRes(@ColorRes int textColorRes)
public T withSelectedTextColor(int selectedTextColor)
public T withSelectedTextColorRes(@ColorRes int selectedColorRes)
public T withDisabledTextColor(int disabledTextColor)
public T withDisabledTextColorRes(@ColorRes int disabledTextColorRes)
public T withIconColor(int iconColor)
public T withIconColorRes(@ColorRes int iconColorRes)
public T withSelectedIconColor(int selectedIconColor)
public T withSelectedIconColorRes(@ColorRes int selectedColorRes)
public T withDisabledIconColor(int disabledIconColor)
public T withDisabledIconColorRes(@ColorRes int disabledIconColorRes)
public T withIconTintingEnabled(boolean iconTintingEnabled)
iconTintingEnabled - @Deprecated public T withIconTinted(boolean iconTinted)
@Deprecated public T withTintSelectedIcon(boolean iconTinted)
iconTinted - public T withTypeface(android.graphics.Typeface typeface)
withTypeface in interface Typefaceable<T>public T withLevel(int level)
public ColorHolder getSelectedColor()
public ColorHolder getTextColor()
public ColorHolder getSelectedTextColor()
public ColorHolder getDisabledTextColor()
public boolean isIconTinted()
public ImageHolder getIcon()
public ImageHolder getSelectedIcon()
public StringHolder getName()
public ColorHolder getDisabledIconColor()
public ColorHolder getSelectedIconColor()
public ColorHolder getIconColor()
public android.graphics.Typeface getTypeface()
getTypeface in interface Typefaceable<T>public int getLevel()
protected int getSelectedColor(android.content.Context ctx)
ctx - protected int getColor(android.content.Context ctx)
ctx - protected int getSelectedTextColor(android.content.Context ctx)
ctx - public int getIconColor(android.content.Context ctx)
ctx - protected int getSelectedIconColor(android.content.Context ctx)
ctx - protected android.content.res.ColorStateList getTextColorStateList(int color,
int selectedTextColor)
color - selectedTextColor -