Understanding android app structure. In our last lecture we learned about how to create a new project in android studio, so if you haven’t watched it yet then here is the link of tutorial http://tutorialhive.net/2018/09/05/4-creating-new-project-android-app-development/ . This lecture is about Understanding android app structure.
After creating project in android studio next step is understanding android app structure.TO learn about its directory structure and files. When you create project in android studio then a window open in front of you. In this window on left side you can see directory structure of your project.
These folders increase as you go on with project but when you create a new project then these are the folders you see.
In app folder we have three sub folders manifest, java and res.
Manifest folder contains a file AndroidManifest.xml . For user interface and front end coding android studio is using XML language s, so some files will be with xml extension and some will be with java extension. This file contain some code we will later discuss this code later in detail.
All activates and classes we will make in your project are declared in manifest. As you can see that first activity which has been created its declaration code is already written here <activity android: name=”.MainActivity”>.Later we will learn a method to automatically declare activities in manifest.
Your application icon, label and theme are set in manifest. Manifest contain app basic info, activates declaration. It also contain all permissions for project will be given in manifest file
All back end coding in android studio is done in java language. Java folder contain three different packages. Right now do not open last two packages. Open first package it contain java file “Main Activity”. This file contain some code which we will discuss later. You will create java files for project under java folder in this package.
Res folder contain four folders drawable, layout, mipmap and values.
Drawable folder is used for images, so images used in app will be placed in drawable folder.
Layout folder is for user interface design xml files are placed under layout folder. It consist App design.
Mipmap folder contain app logo images in different sizes/ resolution.
Values folder contain four different files.
Define all color you use in your application for design.
To define dimensions.
To define strings in app.
It contains styles .
Now we are reaching towards end of understanding android app structure and the last directory is gradle scripts. Gradle is a built tool therefore it compile project. It contain seven files. Open build.gradle (module: app).
Let discuss some code lines:
Understanding android app structure tutorial’s end here. If you have any queries you can ask us on our Facebook page link is given below, Thank you for watching us.
Subscribe on YouTube: https://www.youtube.com/channel/UCOUy6kTpedj7s6HOqM0c08wFollow us on Social Media