![Loading...](https://private-user-images.githubusercontent.com/59910223/292772554-d2b03ada-ce90-4b0f-80c9-8cbc8d67718a.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTI2OTYsIm5iZiI6MTcyNjExMjM5NiwicGF0aCI6Ii81OTkxMDIyMy8yOTI3NzI1NTQtZDJiMDNhZGEtY2U5MC00YjBmLTgwYzktOGNiYzhkNjc3MThhLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDAzMzk1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY1NWM4OGY1OWU3ZTkzMTg3MWY2NzM0NTNjMDZjZWUzYTNmNTYzYmY0YjNmZjI5ZThkYzJkNjlhM2Q3OGQ0OGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hOqiObr-OsbcF8g7KtxSWBjRFPRGYEDxDk2Pm6KFxGU)
![With Badges](https://private-user-images.githubusercontent.com/59910223/294780463-8b52a93c-ecd8-4f75-9068-a14000b649c6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTI2OTYsIm5iZiI6MTcyNjExMjM5NiwicGF0aCI6Ii81OTkxMDIyMy8yOTQ3ODA0NjMtOGI1MmE5M2MtZWNkOC00Zjc1LTkwNjgtYTE0MDAwYjY0OWM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDAzMzk1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlNDBkMjNmZGY4ZjJhNTY1N2NhZWFlNTlkZTMyNzU1Yzk3ZmQzNGE3YWQzN2IwY2MyYTU5NTVjNWVhMmFiZDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FOvkaww9Ko3bjg-al-QYDj4f2Oz7pndRJVb7zHOwzFc)
Step 1. Add the JitPack repository to your build file Add it in your root build.gradle (settings.gradle.kts) at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
google()
maven { url = uri("https://jitpack.io") }
}
}
Step 2. Add the dependency
dependencies {
implementation("com.github.furkanayaz:Slippy-Bottom-Bar:3.0")
}
Step 4. For example to use
val tabs: List<SlippyTab> =
listOf(SlippyTab(name = R.string.home, icon = R.drawable.home, action = {
currentPage = getPage(context = context, id = R.string.home)
}), SlippyTab(name = R.string.search, icon = R.drawable.search, action = {
currentPage = getPage(context = context, id = R.string.search)
}), SlippyTab(name = R.string.record, icon = R.drawable.record, action = {
currentPage = getPage(context = context, id = R.string.record)
}), SlippyTab(name = R.string.records, icon = R.drawable.records, action = {
currentPage = getPage(context = context, id = R.string.records)
}), SlippyTab(name = R.string.settings, icon = R.drawable.settings, action = {
currentPage = getPage(context = context, id = R.string.settings)
})
)
SlippyBottomBar(
theme = SlippyTheme.LINE, bar = SlippyBar(
backgroundColor = R.color.white, textStyle = SlippyTextStyle(
textSize = R.dimen.textSize,
enabledTextColor = R.color.enabledTextColor,
disabledTextColor = R.color.disabledTextColor
), iconStyle = SlippyIconStyle(
iconSize = R.dimen.iconSize,
disabledIconColor = R.color.disabledIconColor,
enabledIconColor = R.color.enabledIconColor, // When the round style is chosen, it should be white in color.
), dividerStyle = SlippyDividerStyle(
dividerColor = R.color.dividerColor
), startIndex = 2
), tabs = tabs)
31 Aug, 2024 - Furkan Ayaz