Creating bottom navigation view in Android application
Today we are going to learn how to create Android bottom navigation view which makes applications functions easily accessible to the user by just one click.
Let get started.
We are going to create a new Project in Android Studio and name it as “BottomNavigation“
Select Android Minimum SDK Version
Create Empty Activity.
Make sure to select generate Layout file and also BackWards compatibility.This makes sure that your application is
compatible with previous devices.
After creating the project,its time now to add com.android.support:design:26.1.0 dependency to our buid.gradle file.
Open the build.gradle and add below code.
Add Home and notifications drawables to your project resources.
Next, we are going to create Menu resource that will have Item for the bottom navigation.
Open activity_main.xml and add below code
Running the application now and below screen should appear in your emulator.
We can modify the appearance of the Navigation Menu by changing the colors and Icon colors and text.
Let now create some fragments that will be loaded once we click on the Home and Notifications icons.