https://github.com/felixsoares/animatedbottombar
This library allows you to show bottom navigation quickly, simply and animated.
https://github.com/felixsoares/animatedbottombar
android bottombar bottomnavigationview kotlin
Last synced: 5 months ago
JSON representation
This library allows you to show bottom navigation quickly, simply and animated.
- Host: GitHub
- URL: https://github.com/felixsoares/animatedbottombar
- Owner: felixsoares
- License: mit
- Created: 2019-03-19T20:06:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T18:12:31.000Z (over 6 years ago)
- Last Synced: 2025-05-11T20:47:24.316Z (5 months ago)
- Topics: android, bottombar, bottomnavigationview, kotlin
- Language: Kotlin
- Homepage:
- Size: 361 KB
- Stars: 25
- Watchers: 0
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
###### This library allows you to show bottom navigation quickly, simply and animated.
# AnimatedBottomBar
Please, have a test in google play [clicking here](https://play.google.com/store/apps/details?id=com.felixsoares.animatedbottomtab).
   []( https://android-arsenal.com/details/1/7604 )

### Getting Started
Add it in your root build.gradle (Project module)
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```Add the dependency in build.gradle (App module)
```gradle
dependencies {
implementation 'com.github.felixsoares:AnimatedBottomBar:1.1'
}
```
## Usage exampleIn layout file
```xml
```
In Activity or Fragment
```kotlin
bottom
.addItem(Item("Home", R.drawable.ic_home))
.addItem(Item("Search", R.drawable.ic_search))
.addItem(Item("Profile", R.drawable.ic_person))
.build()
```### Documentation
1) Support click listener.
```kotlin
import com.felixsoares.animatedbottombar.NavigationListnerclass MainActivity : AppCompatActivity(), NavigationListner {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_default)bottom
.setupListner(this)
.addItem(Item("Home", R.drawable.ic_home))
.addItem(Item("Search", R.drawable.ic_search))
.addItem(Item("Profile", R.drawable.ic_person))
.build()
}override fun OnClick(position: Int) {
Log.i("OnClick", "position $position")
}
}
```2) Support multi color (layout).
```xml
```
2.1) Support multi color (code).
```kotlin
bottom
.setBgColor(android.R.color.black)
.setBgIconColor(android.R.color.holo_blue_dark)
.setIconColor(android.R.color.holo_green_dark)
.setIndicatorColor(android.R.color.holo_red_dark)
.setTextColor(android.R.color.holo_orange_dark)
.setTextSize(12f)
.addItem(Item("Home", R.drawable.ic_home))
.addItem(Item("Search", R.drawable.ic_search))
.addItem(Item("Profile", R.drawable.ic_person))
.build()
```3) Add item by item.
```kotlin
bottom.addItem(Item("Home", R.drawable.ic_home))
```3.1) Add list of Itens.
```kotlin
val list = mutableListOf()
list.add(Item("Home", R.drawable.ic_home))
list.add(Item("Search", R.drawable.ic_search))
list.add(Item("Profile", R.drawable.ic_person))bottom
.setupItens(list)
.build()
```4) Support itens with text or icons.
```kotlin
bottom
.addItem(Item("Home", R.drawable.ic_home))
.addItem(Item("Search", R.drawable.ic_search))
.addItem(Item(R.drawable.ic_notifications_gray, R.drawable.ic_notifications))
```MIT License
Copyright (c) 2019 Felix Soares
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.