![Loading...](https://private-user-images.githubusercontent.com/59910223/292772554-d2b03ada-ce90-4b0f-80c9-8cbc8d67718a.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYzMDQwODksIm5iZiI6MTcxNjMwMzc4OSwicGF0aCI6Ii81OTkxMDIyMy8yOTI3NzI1NTQtZDJiMDNhZGEtY2U5MC00YjBmLTgwYzktOGNiYzhkNjc3MThhLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTIxVDE1MDMwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3MDcyYjI2NDA1MWQzMDQ0ZGQ4ODhjODEzNzcwNGQzNTA2NjE0MjUwYjE3NGNjOTExZGRlMDJjOGRlOGE5MzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4P0o6YlV3o3RXdIm-BOjKgToEHAr4uQe8uAc5Ru6W4E)
![With Badges](https://private-user-images.githubusercontent.com/59910223/294780463-8b52a93c-ecd8-4f75-9068-a14000b649c6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYzMDQwODksIm5iZiI6MTcxNjMwMzc4OSwicGF0aCI6Ii81OTkxMDIyMy8yOTQ3ODA0NjMtOGI1MmE5M2MtZWNkOC00Zjc1LTkwNjgtYTE0MDAwYjY0OWM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTIxVDE1MDMwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyZWE1YjMwNjYzNzg5Y2UwZDA2ZWMxODYyMWJiMDEwMzEwNGQxZWYwZjc0MjQxOGE4MTJlNjljZTI5MTU5ODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eH4IlsRK6Qm64pKVp6S4EEGfxSJHwV0JfhBexqGqZYI)
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:2.3")
}
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
)
), tabs = tabs, startIndex = 2)
13 Jan, 2024 - Furkan Ayaz