Download the New LearnVern Android App and enter Lucky Draw to win Free Certificate
If you are facing any issue in playing video please use Firefox browser.
Now we will create our First basic Application with Android studio.
First of all we will see the structure of our application, so we will see manifests, java, res, and Gradle Scripts under our 'app', we'll see how code is designed.
Firstly, we will see 'manifests', inside which we will see 'AndroidManifest.xml' file, we can say that it is the root of our application.
Here we have to declare all the components which we use in our application. If we do not declare any component here in this manifest file then operating system will not treat it as a component of our application.
We can say that this manifest file works as an Interface between application and our Android operating system.
Now we will see that what contents are inside this manifest file, we will see a application tag (<application>,</application>), and other auto generated files like icon, theme, label etc... After that we will see an intent filter tag, whose two things are specified, 'action' and 'category'.
Secondly, we will see our 'java' folder and inside that 'MainActivity.java' file, in which we will see onCreate() method,
protected void onCreate (Bundle savedInstanceState)
Now inside our ‘resource(res)’ folder, we will open 'layout' in which our 'activity_maim.xml' file is saved, inside which we will specify that how will be the UI of our application. By default Relative layout will be used, and whatever the changes we do here will be changed in our display.
After that we have values, inside that we will different xml files, like if we want to specify any color theme than 'colors.xml', 'strings.xml', 'styles.xml', 'dimens.xml'.
So this is how the basic structure of our First Application is, and how the default generated code are there in different folders and files.
Have a friend to whom you would want to share this course?