-->

Encrypting your link and protect the link from viruses, malware, thief, etc! Made your link safe to visit.

Structure of Android Project:Important files

There is a number of files present in the Android Studio when you create your project. In this article, I will be discussing some crucial file in your Android Studio Project.

Android App Structure


1) R.java File
Everything which is placed inside the res(resource) folder like drawable, layouts, mipmap, values is connected via the R.java file.

Ex: In MainActivity.java, there is a function present named onCreate().There a line of code is written as:

       setContentView(R.layout.activity_main);

Here we are accessing the layout folder and then the file named 'activity_main' using R.java file.

2) strings.xml File

This file is used to store the String value that we will be using in our project.

It is placed inside res>values folder.

Here how you use it:

android:title="@string/delete"

The Real value is stored in strings.xml file this is just a reference.



So Why do we need it?
But we could have used simply given Delete value to the title why do so much work. Suppose a scenario, where we are using the same string number of times. Now after some time, you need to change the string. So now you need to change the string value number of times. But if you used the string resource you just would have to change the value in strings.xml file and it would be reflected in all the places.

3) AndroidManifest.xml File

It is a very important file as it contains all the information about our app. It defines our App Structure. It also allows us to add permissions. It contains vital information about our App like the theme, launcher icons, activities.

It also specifies which Activity would the Launcher Activity(Splash Screen).

ST

Social

Recent

⬇⬇Get Your Link⬇⬇