Navigation Editor In Android Studio 3.3 Is Grabbing All The Attention This Year!
Google welcomed this New year with the release of a stable version of Android studio version 3.3. Google post stated that this version focuses mainly on “Refinement and quality” over new features.
This release has squashed almost over 200 reported bugs since the last version released. Other noteworthy improvements are official support for Navigation editor, C++ code lint inspection, incremental Java compilation, and an updated project wizard. Saving snapshots on exit has been 8x times faster with Android studio 3.3.
No doubt, that the Android studio 3.3 has polished the Google’s Integrated Development Environment (IDE) which was long due but let’s focus more in this article on the Navigation editor.
The good news is, with this Navigation editor you can create destinations, define the parameters and can also specify a transition between them.
According to Google:
”This visual editor allows you to construct XML resources that support the new Jetpack Navigation Component. With the help of the Editor and Component, you can build interactions between the screens and the content areas of the application. This simplified the navigation or ‘actions’ between ‘destination nodes’ in the application. The navigation editor was previewed in the earlier Android studio release but the features were improved based on the user’s feedback”
Using this navigation architecture, the destinations can easily be connected with drag and drop and we can also define the kind of shift for each user action.
Let’s have an idea here on how to create a Navigation editor:
Step 1: Make a new project.
Step 2: Right-click the resource directory and make a new resource directory.
Reference is taken from this link.
A window like the one shown below will appear on the screen which will create a new resource file.
Step 3: Go to the newly created resource XML file and enter the following code inside.
Step 4: Create a new blank fragment with any desired name from navigation.
Step 5: Enter the code given below:
<?xml version=”1.0″ encoding=”utf-8″?>
There you go with your first navigation screen. You can create all other screens by creating as many fragments as you want.
This all-new version of navigation editor supports animation and its property which can be helpful in creating a transition between the destinations.
Get the pictorial representation of the flow of activities performed within the application with this Navigation editor!