
Placeholder is an empty container which you can replace with a fragment or an activity later. A start can have multiple destinations depending upon the scenarios. Destination is that screen to which we travel from the start. Destination Start is that screen from which we can navigate to some other destination. It provides all the methods to handle navigation as well as argument passing. NavController is an object of singleton class which is built during the Gradle building process just like the R class. NavHost is an activity hosting container fragment i.e NavHostFragment content which is replaced as the user navigates from one screen to another screen. Navigation API also provides back button listener in NavHostFragment meaning you no longer have to iterate fragment back stack every time to determine which fragment is currently at top, etc. Fragments and routes implemented with navigation API can be easily deep linked with the help of deep linking API present in Navigation API. Transition animation can be inscribed in the navigation graph itself. Navigation API provides SafeArgs API where you can describe the type of data, its name, and default type. You don't need to write factory methods for passing data from one start to the destination screen. You only need to describe the routes, i.e., transition Which can be described in XML in WYSIWY fashion with navigation graph editor tool. You don't have to request FragmentManager ever again for transitioning from one fragment to another. We can even create more classes in the same package. To design the front-end of the application we write code in activity_main.xml and for providing functionality to our application we write java code in MainActivity.java file. In the MainActivity.java write java code and in activity_main.xml file write code to design front-end of the app. (You will get two files MainActivity.java and activity_main.xml) Now enter the details that are the name of the project, name of the package, and android version.
Click on the new option and select the wizard that you want and click on the next option.
Open Android Studio and click on the file option on the upper left corner of the screen.Create Weather Forecasting app in Android Studio In this project, we are using Android Studio 3.6.3. We can use any version of Android Studio. Therefore we can say that using Eclipse IDE is a lengthy process so instead of using Eclipse IDE most of the developers prefer using Android studio. For using Eclipse IDE we need to add ADT plugin, SDK manager, and Android Version. We can create an android project either using Android Studio or Eclipse IDE. In this tutorial, we will create a Weather Forecasting application in android using java.