Hello friends, in the last post we have done all the system configuration for our Android Development Tutorial Series. Today we will understand some basics that will help you in android application development.
Android Development Tutorial using Android Studio
We have installed and configured Android Studio for Android Development. Now there is some basic things in Android Studio IDE which you should know. So lets start
- Open the last project (“Hello World”) in Android Studio (“We created this project in the last tutorial“)
- You will be seeing the above screen after opening your HelloWorld project. I am explaining the above given areas below.
You are seeing two things at number 1. The first is our app directory and the other one is our Gradle Scripts. Extract your app directory.
App Directory in Android Studio
- This directory contains AndoirdManifest.xml file. But the question is What is AndroidManifest.xml?
- In android every application must have this file. It gives the necessary system about the application to android system. AndroidManifest.xml contains
- Java Package name of the application
- It describes the app icon, theme and label
- It describes all the components of your application like, activities, broadcast receivers, services etc.
- It describes all the permissions your application has to access the restrict part of android system
- It also tells the minimum api level for your application
- You can see the basic structure of AndroidManifest.xml by opening the file (double click to open)
<?xml version="1.0" encoding="utf-8"?>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
We will also cover these things later on in detail.
- The next directory you are seeing is java. It has two sub directories. If you can see the sub directories name are same as your package name. This folder contains all the java source code. You can also create new packages here to organize your java classes. But you have to touch or manipulate only the first sub directory.
- The second sub directory is named package_name (androidTest). It is generated automatically.
- This folder contains all the resources for your android application. Inside this folder we have
- Here we keep all the drawable resources like images.
- All the XML files for your activity layouts are stored here
- Menu XML files are stored here
- Here we can see the application icon for all screen sizes
- Inside values we have a directory name dimens and two xml files named strings.xml and styles.xml
- strings.xml: This file contains all the strings that will be used in our project.
- styles.xml: This file contains the styles and themes for our application.
- Inside the directory dimens we have two xml files that stores the margin values.
Now don’t bother more we will be covering everything again while creating apps in this android development tutorial series.
The next your are seeing in #1 is Gradle.
What is Gradle?
The basic one liner answer is: Gradle is a Build System.
Gradle takes best features of other build system and combines it to one. And because it is an JVM (Java Virtual Machine) based build system we are free to write our own script here. If you are not getting anything then don’t worry we will understand this later on in detail.
Here you can see the components that will be needed to design our application. Things here are very simple we can drag the component from here to #3.
This is the visual layout you are seeing of your application’s screen. As I already said the visual designing in android are done with XML. So we can also write codes to design our app. To code for designing we can go to the Text Option from #4
From here we can switch from visual drop down design to xml coding and vice versa.
Here you can see all the components used in your screen in an hierarchical manner.
Here you can see all the properties of the currently selected component.
Now I am wrapping up this part of android app development tutorial here. This was the basics about Android Studio IDE. From the next posts of this Android Development Tutorial Series we will start making some apps. Till then stay tuned and share the post if you liked it. Thank You 🙂
Next Post: Button and Edit Text