![Loading...](https://private-user-images.githubusercontent.com/59910223/292772554-d2b03ada-ce90-4b0f-80c9-8cbc8d67718a.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjI3MTQsIm5iZiI6MTczODgyMjQxNCwicGF0aCI6Ii81OTkxMDIyMy8yOTI3NzI1NTQtZDJiMDNhZGEtY2U5MC00YjBmLTgwYzktOGNiYzhkNjc3MThhLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA2MTMzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMzYzE3YzQzZmQ4MDhjNWQzZTUyNTkyYThmZDBiYWU3NmE2MmUwMTk4ZTRmYTk2ZmFmNDRkMGZkNmYwZjY5Y2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dpLU33lPDHXpMzUy6MGhjyQmToRofg8GmwXKopS0v8M)
![With Badges](https://private-user-images.githubusercontent.com/59910223/294780463-8b52a93c-ecd8-4f75-9068-a14000b649c6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjI3MTQsIm5iZiI6MTczODgyMjQxNCwicGF0aCI6Ii81OTkxMDIyMy8yOTQ3ODA0NjMtOGI1MmE5M2MtZWNkOC00Zjc1LTkwNjgtYTE0MDAwYjY0OWM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDA2MTMzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzNTRjNWI1NzNmOTgxNjkzZWQxYjBkNGUzZjhkOWUwZmI3NTYzZmNiNDVlYzdiMGQ5OTM3YWVkYTYyMjk4ZGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.FQupm6Gzyjc9lnWOTf1G1A53Tg4omIJkufckwFRZe-Q)
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