Curve Navigation Drawer in Android using ArcNavigationView
The Navigation Drawer is a layout that can be seen in certain applications, that consists of some other activity shortcuts (Intents). This drawer generally can be seen at the left edge of the screen, which is by default. A Button to access the Navigation Drawer is by default provided at the action bar.
UI changes can be applied to the Navigation Drawer. One such idea to change the Navigation Drawer UI is by making its outer edge an inner or an outer arc. This gives a creative and a richer look to the Drawer. Since some changes are limited by the Android Studio packages, such implementations require an outside library for making desired changes. This is done by implementing a known dependency (library) of an implementation that is desirable. Similarly, we as well implemented a dependency to fulfill our requirements.
Inside Arc Design on Navigation Drawer
To create an Inside Arc Design to the Navigation Drawer in an Android device, follow the following steps:
Step 1: Create a New Project
Create a Navigation Drawer Activity in Android Studio. To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio. As you click finish, the project builds, might take a minute or two.
Step 2: Add the Dependency to the build.gradle of the app
Add the following dependency to the build.gradle (app) file.
Step 3: Working with the activity_main.xml file
When the setup is ready, go to the activity_main.xml file, which represents the UI of the project. Add the Script as shown below between the opening and closing Drawer Layout element.
Output: Run on Emulator
Outside Arc Design on Navigation Drawer
Similarly to create an Outside Arc, make changes to the layout file. Changes made to activity_main.xml file: