Morph Bottom Navigation
This library represents a Bottom Navigation with an awesome morph effect on top of the selected item.
Don't forget to star the project if you like it!
==
And feel free to submit issues and enhancement requests !
How to
Gradle
dependencies {
implementation 'com.tbuonomo:morph-bottom-navigation:1.0.1'
}
Usage
MorphBottomNavigationView
extends the BottomNavigationView
from the official Google Material Component repository, so you can use it as described on the Android Developers documentation
In your XML layout
<com.tbuonomo.morphbottomnavigation.MorphBottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/menu_bottom_navigation"
app:backgroundTint="@color/colorPrimary"
app:morphCornerRadius="128dp"
app:morphItemRadius="64dp"
app:morphVerticalOffset="8dp"
style="@style/BottomNavigationView"
/>
Custom Attributes
Attribute | Description |
---|---|
backgroundTint |
Color of the bottom navigation background |
morphCornerRadius |
Radius in dp of the morph corners (by default 128dp) |
morphItemRadius |
Radius in dp of the morph item circle shape (by default 64dp) |
morphVerticalOffset |
The vertical offset of the morph shape above the bottom navigation (by default 8dp) |
License
Copyright 2018 Tommy Buonomo
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.