public class BottomNavigationViewInner
extends BottomNavigationView
| Constructor and Description |
|---|
BottomNavigationViewInner(android.content.Context context) |
BottomNavigationViewInner(android.content.Context context,
android.util.AttributeSet attrs) |
BottomNavigationViewInner(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
BottomNavigationViewInner |
clearIconTintColor()
The lib has a default icon tint color.
|
static int |
dp2px(android.content.Context context,
float dpValue)
dp to px
|
BottomNavigationViewInner |
enableAnimation(boolean enable)
enable or disable click item animation(text scale and icon move animation in no item shifting mode)
|
BottomNavigationViewInner |
enableItemShiftingMode(boolean enable)
Deprecated.
|
BottomNavigationViewInner |
enableShiftingMode(boolean enable)
Deprecated.
|
BottomNavigationViewInner |
enableShiftingMode(int position,
boolean enable) |
BottomNavigationItemView |
getBottomNavigationItemView(int position)
get private mButton in mMenuView at position
|
BottomNavigationItemView[] |
getBottomNavigationItemViews()
get private mButtons in mMenuView
|
BottomNavigationMenuView |
getBottomNavigationMenuView()
get private mMenuView
|
int |
getCurrentItem()
get the current checked item position
|
android.widget.ImageView |
getIconAt(int position)
get icon at position
|
int |
getItemCount()
return item count
|
int |
getItemHeight()
get menu item height
|
android.widget.TextView |
getLargeLabelAt(int position)
get large label at position
Each item has tow label, one is large, another is small.
|
int |
getMenuItemPosition(android.view.MenuItem item)
get menu item position in menu
|
OnNavigationItemSelectedListener |
getOnNavigationItemSelectedListener()
get OnNavigationItemSelectedListener
|
android.widget.TextView |
getSmallLabelAt(int position)
get small label at position
Each item has tow label, one is large, another is small.
|
BottomNavigationViewInner |
setCurrentItem(int index)
set the current checked item
|
BottomNavigationViewInner |
setIconMarginTop(int position,
int marginTop)
set margin top for icon
|
BottomNavigationViewInner |
setIconSize(float dpSize)
set all item ImageView size
|
BottomNavigationViewInner |
setIconSize(float width,
float height)
set all item ImageView size
|
BottomNavigationViewInner |
setIconSizeAt(int position,
float width,
float height)
set item ImageView size which at position
|
BottomNavigationViewInner |
setIconsMarginTop(int marginTop)
set margin top for all icons
|
BottomNavigationViewInner |
setIconTintList(int position,
android.content.res.ColorStateList tint) |
BottomNavigationViewInner |
setIconVisibility(boolean visibility)
change the visibility of icon
|
BottomNavigationViewInner |
setItemBackground(int position,
int background) |
BottomNavigationViewInner |
setItemHeight(int height)
set menu item height
|
BottomNavigationViewInner |
setLargeTextSize(float sp)
set all item large TextView size
Each item has tow label, one is large, another is small.
|
void |
setOnNavigationItemSelectedListener(OnNavigationItemSelectedListener listener) |
BottomNavigationViewInner |
setSmallTextSize(float sp)
set all item small TextView size
Each item has tow label, one is large, another is small.
|
BottomNavigationViewInner |
setTextSize(float sp)
set all item large and small TextView size
Each item has tow label, one is large, another is small.
|
BottomNavigationViewInner |
setTextTintList(int position,
android.content.res.ColorStateList tint) |
BottomNavigationViewInner |
setTextVisibility(boolean visibility)
change the visibility of text
|
BottomNavigationViewInner |
setTypeface(android.graphics.Typeface typeface)
set Typeface for all item TextView
|
BottomNavigationViewInner |
setTypeface(android.graphics.Typeface typeface,
int style)
set Typeface for all item TextView
|
BottomNavigationViewInner |
setupWithViewPager(ViewPager viewPager)
This method will link the given ViewPager and this BottomNavigationViewInner together so that
changes in one are automatically reflected in the other.
|
BottomNavigationViewInner |
setupWithViewPager(ViewPager viewPager,
boolean smoothScroll)
This method will link the given ViewPager and this BottomNavigationViewInner together so that
changes in one are automatically reflected in the other.
|
public BottomNavigationViewInner(android.content.Context context)
public BottomNavigationViewInner(android.content.Context context,
android.util.AttributeSet attrs)
public BottomNavigationViewInner(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public BottomNavigationViewInner setIconVisibility(boolean visibility)
visibility - public BottomNavigationViewInner setTextVisibility(boolean visibility)
visibility - public BottomNavigationViewInner enableAnimation(boolean enable)
enable - It means the text won't scale and icon won't move when active it in no item shifting mode if false.@Deprecated public BottomNavigationViewInner enableShiftingMode(boolean enable)
enable - It will has a shift animation if true. Otherwise all items are the same width.@Deprecated public BottomNavigationViewInner enableItemShiftingMode(boolean enable)
enable - It will has a shift animation for item if true. Otherwise the item text always be shown.public int getCurrentItem()
public int getMenuItemPosition(android.view.MenuItem item)
item - public BottomNavigationViewInner setCurrentItem(int index)
index - start from 0.public OnNavigationItemSelectedListener getOnNavigationItemSelectedListener()
public void setOnNavigationItemSelectedListener(OnNavigationItemSelectedListener listener)
public BottomNavigationMenuView getBottomNavigationMenuView()
public BottomNavigationViewInner clearIconTintColor()
public BottomNavigationItemView[] getBottomNavigationItemViews()
public BottomNavigationItemView getBottomNavigationItemView(int position)
position - public android.widget.ImageView getIconAt(int position)
position - public android.widget.TextView getSmallLabelAt(int position)
position - public android.widget.TextView getLargeLabelAt(int position)
position - public int getItemCount()
public BottomNavigationViewInner setSmallTextSize(float sp)
sp - public BottomNavigationViewInner setLargeTextSize(float sp)
sp - public BottomNavigationViewInner setTextSize(float sp)
sp - public BottomNavigationViewInner setIconSizeAt(int position, float width, float height)
position - position start from 0width - in dpheight - in dppublic BottomNavigationViewInner setIconSize(float width, float height)
width - in dpheight - in dppublic BottomNavigationViewInner setIconSize(float dpSize)
dpSize - in dppublic BottomNavigationViewInner setItemHeight(int height)
height - in pxpublic int getItemHeight()
public static int dp2px(android.content.Context context,
float dpValue)
context - dpValue - dppublic BottomNavigationViewInner setTypeface(android.graphics.Typeface typeface, int style)
public BottomNavigationViewInner setTypeface(android.graphics.Typeface typeface)
public BottomNavigationViewInner setupWithViewPager(ViewPager viewPager)
viewPager - public BottomNavigationViewInner setupWithViewPager(ViewPager viewPager, boolean smoothScroll)
viewPager - smoothScroll - whether ViewPager changed with smooth scroll animationpublic BottomNavigationViewInner enableShiftingMode(int position, boolean enable)
public BottomNavigationViewInner setItemBackground(int position, int background)
public BottomNavigationViewInner setIconTintList(int position, android.content.res.ColorStateList tint)
public BottomNavigationViewInner setTextTintList(int position, android.content.res.ColorStateList tint)
public BottomNavigationViewInner setIconsMarginTop(int marginTop)
marginTop - in pxpublic BottomNavigationViewInner setIconMarginTop(int position, int marginTop)
position - marginTop - in px