AndroidBottomBar / com.skydoves.androidbottombar / AndroidBottomBarView

AndroidBottomBarView

class AndroidBottomBarView : FrameLayout

AndroidBottomBarView is a lightweight bottom navigation view, fully customizable with an indicator and animations.

Constructors

<init>

AndroidBottomBarView is a lightweight bottom navigation view, fully customizable with an indicator and animations.

AndroidBottomBarView(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Properties

bottomMenuItemViews

var bottomMenuItemViews: MutableList<BottomMenuItemView>

indicator

val indicator: View

indicatorColor

var indicatorColor: Int

indicatorDrawable

var indicatorDrawable: Drawable?

indicatorHeight

var indicatorHeight: Int

indicatorPadding

var indicatorPadding: Int

indicatorRadius

var indicatorRadius: Float

onBottomMenuInitializedListener

var onBottomMenuInitializedListener: OnBottomMenuInitializedListener?

onMenuItemSelectedListener

var onMenuItemSelectedListener: OnMenuItemSelectedListener?

selectedIndex

var selectedIndex: Int

selectedItemView

var selectedItemView: BottomMenuItemView?

visibleIndicator

var visibleIndicator: Boolean

Functions

addBottomMenuItems

adds an initial list of BottomMenuItem.

fun addBottomMenuItems(bottomMenuItems: List<BottomMenuItem>): Unit

bindViewPager

binds a ViewPager to AndroidBottomBarView for selecting menu items and moving an indicator automatically by scrolling of viewPager.

fun bindViewPager(viewPager: ViewPager): Unit

bindViewPager2

binds a ViewPager2 to AndroidBottomBarView for selecting menu items and moving an indicator automatically by scrolling of viewPager.

fun bindViewPager2(viewPager2: ViewPager2): Unit

dismissBadge

dismisses the badge by an index.

fun dismissBadge(index: Int): Unit

getBottomMenuItemView

gets a BottomMenuItemView by an index.

fun getBottomMenuItemView(index: Int): BottomMenuItemView

onSizeChanged

fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int): Unit

setOnBottomMenuInitializedListener

sets an OnBottomMenuInitializedListener.

fun setOnBottomMenuInitializedListener(initializedListener: OnBottomMenuInitializedListener): Unit

sets an OnBottomMenuInitializedListener using an lambda.

fun setOnBottomMenuInitializedListener(block: () -> Unit): Unit

setOnMenuItemSelectedListener

sets an OnMenuItemSelectedListener.

fun setOnMenuItemSelectedListener(onMenuItemSelectedListener: OnMenuItemSelectedListener): Unit

sets an OnMenuItemSelectedListener using an lambda.

fun setOnMenuItemSelectedListener(block: (index: Int, bottomMenuItem: BottomMenuItem, fromUser: Boolean) -> Unit): Unit

showBadge

shows the badge by an index.

fun showBadge(index: Int): Unit

shows the badge by an index and changes badge text.

fun showBadge(index: Int, badgeText: CharSequence? = null): Unit