public class ProfileDrawerItem extends AbstractDrawerItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder> implements IProfile<ProfileDrawerItem>, Tagable<ProfileDrawerItem>, Typefaceable<ProfileDrawerItem>
| Modifier and Type | Class and Description |
|---|---|
static class |
ProfileDrawerItem.ItemFactory |
protected static class |
ProfileDrawerItem.ViewHolder |
| Modifier and Type | Field and Description |
|---|---|
protected android.util.Pair<java.lang.Integer,android.content.res.ColorStateList> |
colorStateList |
protected ColorHolder |
disabledTextColor |
protected StringHolder |
email |
protected ImageHolder |
icon |
protected StringHolder |
name |
protected boolean |
nameShown |
protected ColorHolder |
selectedColor |
protected ColorHolder |
selectedTextColor |
protected ColorHolder |
textColor |
protected android.graphics.Typeface |
typeface |
mEnabled, mIdentifier, mOnDrawerItemClickListener, mOnPostBindViewListener, mSelectable, mSelected, mSubItems, mTag| Constructor and Description |
|---|
ProfileDrawerItem() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindView(ProfileDrawerItem.ViewHolder viewHolder) |
protected int |
getColor(android.content.Context ctx)
helper method to decide for the correct color
|
ColorHolder |
getDisabledTextColor() |
StringHolder |
getEmail() |
com.mikepenz.fastadapter.utils.ViewHolderFactory<ProfileDrawerItem.ViewHolder> |
getFactory()
the abstract method to retrieve the ViewHolder factory
The ViewHolder factory implementation should look like (see the commented code above)
|
ImageHolder |
getIcon() |
int |
getLayoutRes() |
StringHolder |
getName() |
ColorHolder |
getSelectedColor() |
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
|
int |
getType() |
android.graphics.Typeface |
getTypeface() |
boolean |
isNameShown() |
ProfileDrawerItem |
withDisabledTextColor(int disabledTextColor) |
ProfileDrawerItem |
withDisabledTextColorRes(int disabledTextColorRes) |
ProfileDrawerItem |
withEmail(java.lang.String email) |
ProfileDrawerItem |
withIcon(android.graphics.Bitmap iconBitmap) |
ProfileDrawerItem |
withIcon(android.graphics.drawable.Drawable icon) |
ProfileDrawerItem |
withIcon(com.mikepenz.iconics.typeface.IIcon icon) |
ProfileDrawerItem |
withIcon(int iconRes) |
ProfileDrawerItem |
withIcon(java.lang.String url) |
ProfileDrawerItem |
withIcon(android.net.Uri uri) |
ProfileDrawerItem |
withName(java.lang.String name) |
ProfileDrawerItem |
withNameShown(boolean nameShown) |
ProfileDrawerItem |
withSelectedColor(int selectedColor) |
ProfileDrawerItem |
withSelectedColorRes(int selectedColorRes) |
ProfileDrawerItem |
withSelectedTextColor(int selectedTextColor) |
ProfileDrawerItem |
withSelectedTextColorRes(int selectedColorRes) |
ProfileDrawerItem |
withTextColor(int textColor) |
ProfileDrawerItem |
withTextColorRes(int textColorRes) |
ProfileDrawerItem |
withTypeface(android.graphics.Typeface typeface) |
equals, equals, equals, generateView, generateView, 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, waitisSelectable, withSelectableprotected boolean nameShown
protected ImageHolder icon
protected StringHolder name
protected StringHolder email
protected ColorHolder selectedColor
protected ColorHolder textColor
protected ColorHolder selectedTextColor
protected ColorHolder disabledTextColor
protected android.graphics.Typeface typeface
protected android.util.Pair<java.lang.Integer,android.content.res.ColorStateList> colorStateList
public ProfileDrawerItem withIcon(android.graphics.drawable.Drawable icon)
withIcon in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withIcon(@DrawableRes int iconRes)
withIcon in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withIcon(android.graphics.Bitmap iconBitmap)
withIcon in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withIcon(com.mikepenz.iconics.typeface.IIcon icon)
withIcon in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withIcon(java.lang.String url)
withIcon in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withIcon(android.net.Uri uri)
withIcon in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withName(java.lang.String name)
withName in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withEmail(java.lang.String email)
withEmail in interface IProfile<ProfileDrawerItem>public ProfileDrawerItem withNameShown(boolean nameShown)
public ProfileDrawerItem withSelectedColor(int selectedColor)
public ProfileDrawerItem withSelectedColorRes(@ColorRes int selectedColorRes)
public ProfileDrawerItem withTextColor(int textColor)
public ProfileDrawerItem withTextColorRes(@ColorRes int textColorRes)
public ProfileDrawerItem withSelectedTextColor(int selectedTextColor)
public ProfileDrawerItem withSelectedTextColorRes(@ColorRes int selectedColorRes)
public ProfileDrawerItem withDisabledTextColor(int disabledTextColor)
public ProfileDrawerItem withDisabledTextColorRes(@ColorRes int disabledTextColorRes)
public ProfileDrawerItem withTypeface(android.graphics.Typeface typeface)
withTypeface in interface Typefaceable<ProfileDrawerItem>public boolean isNameShown()
public ColorHolder getSelectedColor()
public ColorHolder getTextColor()
public ColorHolder getSelectedTextColor()
public ColorHolder getDisabledTextColor()
public android.graphics.Typeface getTypeface()
getTypeface in interface Typefaceable<ProfileDrawerItem>public ImageHolder getIcon()
getIcon in interface IProfile<ProfileDrawerItem>public StringHolder getName()
getName in interface IProfile<ProfileDrawerItem>public StringHolder getEmail()
getEmail in interface IProfile<ProfileDrawerItem>public int getType()
getType in interface com.mikepenz.fastadapter.IItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>getType in interface IDrawerItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>@LayoutRes public int getLayoutRes()
getLayoutRes in interface com.mikepenz.fastadapter.IItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>getLayoutRes in interface IDrawerItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>public void bindView(ProfileDrawerItem.ViewHolder viewHolder)
bindView in interface com.mikepenz.fastadapter.IItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>bindView in interface IDrawerItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>public com.mikepenz.fastadapter.utils.ViewHolderFactory<ProfileDrawerItem.ViewHolder> getFactory()
AbstractDrawerItemgetFactory in class AbstractDrawerItem<ProfileDrawerItem,ProfileDrawerItem.ViewHolder>protected int getColor(android.content.Context ctx)
ctx - protected int getSelectedTextColor(android.content.Context ctx)
ctx - protected android.content.res.ColorStateList getTextColorStateList(int color,
int selectedTextColor)
color - selectedTextColor -