public class BottomNavigationItem extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
inActiveIconAvailable |
protected int |
mActiveColor |
protected String |
mActiveColorCode |
protected int |
mActiveColorResource |
protected BadgeItem |
mBadgeItem |
protected android.graphics.drawable.Drawable |
mIcon |
protected int |
mIconResource |
protected int |
mInActiveColor |
protected String |
mInActiveColorCode |
protected int |
mInActiveColorResource |
protected android.graphics.drawable.Drawable |
mInactiveIcon |
protected int |
mInactiveIconResource |
protected String |
mTitle |
protected int |
mTitleResource |
| 构造器和说明 |
|---|
BottomNavigationItem(android.graphics.drawable.Drawable mIcon,
int mTitleResource) |
BottomNavigationItem(android.graphics.drawable.Drawable mIcon,
String mTitle) |
BottomNavigationItem(int mIconResource,
int mTitleResource) |
BottomNavigationItem(int mIconResource,
String mTitle) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
getActiveColor(android.content.Context context) |
protected BadgeItem |
getBadgeItem() |
protected android.graphics.drawable.Drawable |
getIcon(android.content.Context context) |
protected int |
getInActiveColor(android.content.Context context) |
protected android.graphics.drawable.Drawable |
getInactiveIcon(android.content.Context context) |
protected String |
getTitle(android.content.Context context) |
protected boolean |
isInActiveIconAvailable() |
BottomNavigationItem |
setActiveColor(int color)
设置选中颜色
|
BottomNavigationItem |
setActiveColor(String colorCode)
设置选中颜色
|
BottomNavigationItem |
setActiveColorResource(int colorResource)
设置选中颜色
|
BottomNavigationItem |
setBadgeItem(BadgeItem badgeItem) |
BottomNavigationItem |
setInActiveColor(int color)
设置默认颜色
|
BottomNavigationItem |
setInActiveColor(String colorCode)
设置默认颜色
|
BottomNavigationItem |
setInActiveColorResource(int colorResource)
设置默认颜色
|
BottomNavigationItem |
setInactiveIcon(android.graphics.drawable.Drawable mInactiveIcon)
By default library will switch the color of icon provided (in between active and in-active icons) This method is used, if people need to set different icons for active and in-active modes.
|
BottomNavigationItem |
setInactiveIconResource(int mInactiveIconResource)
By default library will switch the color of icon provided (in between active and in-active icons) This method is used, if people need to set different icons for active and in-active modes.
|
protected int mIconResource
protected android.graphics.drawable.Drawable mIcon
protected int mInactiveIconResource
protected android.graphics.drawable.Drawable mInactiveIcon
protected boolean inActiveIconAvailable
protected int mTitleResource
protected String mTitle
protected int mActiveColorResource
protected String mActiveColorCode
protected int mActiveColor
protected int mInActiveColorResource
protected String mInActiveColorCode
protected int mInActiveColor
protected BadgeItem mBadgeItem
public BottomNavigationItem(@DrawableRes
int mIconResource,
@NonNull
String mTitle)
mIconResource - resource for the Tab icon.mTitle - title for the Tab.public BottomNavigationItem(android.graphics.drawable.Drawable mIcon,
@NonNull
String mTitle)
mIcon - drawable icon for the Tab.mTitle - title for the Tab.public BottomNavigationItem(android.graphics.drawable.Drawable mIcon,
@StringRes
int mTitleResource)
mIcon - drawable icon for the Tab.mTitleResource - resource for the title.public BottomNavigationItem(@DrawableRes
int mIconResource,
@StringRes
int mTitleResource)
mIconResource - resource for the Tab icon.mTitleResource - resource for the title.public BottomNavigationItem setInactiveIcon(android.graphics.drawable.Drawable mInactiveIcon)
mInactiveIcon - in-active drawable iconpublic BottomNavigationItem setInactiveIconResource(@DrawableRes int mInactiveIconResource)
mInactiveIconResource - resource for the in-active icon.public BottomNavigationItem setActiveColorResource(@ColorRes int colorResource)
colorResource - resource for active colorpublic BottomNavigationItem setActiveColor(@Nullable String colorCode)
colorCode - color code for active colorpublic BottomNavigationItem setActiveColor(int color)
color - active colorpublic BottomNavigationItem setInActiveColorResource(@ColorRes int colorResource)
colorResource - resource for in-active colorpublic BottomNavigationItem setInActiveColor(@Nullable String colorCode)
colorCode - color code for in-active colorpublic BottomNavigationItem setInActiveColor(int color)
color - in-active colorpublic BottomNavigationItem setBadgeItem(@Nullable BadgeItem badgeItem)
badgeItem - badge that needs to be displayed for this tabprotected android.graphics.drawable.Drawable getIcon(android.content.Context context)
context - to fetch drawableprotected String getTitle(android.content.Context context)
context - to fetch resourceprotected android.graphics.drawable.Drawable getInactiveIcon(android.content.Context context)
context - to fetch resourcesprotected boolean isInActiveIconAvailable()
protected int getActiveColor(android.content.Context context)
context - to fetch colorprotected int getInActiveColor(android.content.Context context)
context - to fetch colorprotected BadgeItem getBadgeItem()