Companion

object Companion

Companion object containing the methods for setting the listeners and the corresponding behaviors when the menu items in the bottom navigation view are selected, alongside constants referring to these menu items.

Properties

BOOKMARK
Link copied to clipboard
const val BOOKMARK: Int = 3
Constant referring to the Bookmarks menu in the bottom navigation view.
FOLLOW
Link copied to clipboard
const val FOLLOW: Int = 2
Constant referring to the Followed menu in the bottom navigation view.
HOME
Link copied to clipboard
const val HOME: Int = 1
Constant referring to the Home menu in the bottom navigation view.
INVALID
Link copied to clipboard
private const val INVALID: Int
Constant referring to an invalid option in the bottom navigation view.
USER
Link copied to clipboard
const val USER: Int = 4
Constant referring to the Profile menu in the bottom navigation view.

Functions

getPosition
Link copied to clipboard
private fun getPosition(itemId: Int): Int
Maps the ID of the icon in the bottom navigation view to the menu it represents (technically, the constant referring to that menu).
setBottomMenuListeners
Link copied to clipboard
fun setBottomMenuListeners(bnv: BottomNavigationView, from: Activity, packageContext: Context)
Sets the listeners and defines the corresponding behaviors (limited to passing intents and starting activities) when the items in the given bottom navigation view for registered users are selected.
setBottomMenuListenersUnregistered
Link copied to clipboard
fun setBottomMenuListenersUnregistered(bnv: BottomNavigationView, from: Activity, packageContext: Context)
Sets the listeners and defines the corresponding behaviors (limited to passing intents, and starting activities) when the items in the given bottom navigation view for unregistered users are selected.
setFinishBottomMenuListeners
Link copied to clipboard
fun setFinishBottomMenuListeners(bnv: BottomNavigationView, from: Activity, packageContext: Context)
Sets the listeners and defines the corresponding behaviors (limited to passing intents, destroying current activities, and starting activities) when the items in the given bottom navigation view for registered users are selected.
fun setFinishBottomMenuListenersUnregistered(bnv: BottomNavigationView, from: Activity, packageContext: Context)
Sets the listeners and defines the corresponding behaviors (limited to passing intents, destroying current activities, and starting activities) when the items in the given bottom navigation view for unregistered users are selected.
setScrollBottomMenuListeners
Link copied to clipboard
fun setScrollBottomMenuListeners(bnv: BottomNavigationView, nsv: NestedScrollView, scroll: Int, from: Activity, packageContext: Context)
Sets the listeners and defines the corresponding behaviors (limited to passing intents, scrolling actions, and starting activities) when the items in the given bottom navigation view for registered users are selected.
fun setScrollBottomMenuListenersUnregistered(bnv: BottomNavigationView, nsv: NestedScrollView, packageContext: Context)
Sets the listeners and defines the corresponding behaviors (limited to scrolling actions and starting activities) when the items in the given bottom navigation view for unregistered users are selected.