[go: up one dir, main page]

0% found this document useful (0 votes)
26 views4 pages

Project Structure

Uploaded by

meakela0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Project Structure

Uploaded by

meakela0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Project Structure of Android

Manifests Folder
● Manifest folder contains AndroidManifest.xml for creating our
android application.
● This file contains information about our application such as the
Android version, metadata, states package for Kotlin file, and other
application components.
● It is an intermediate between OS and application
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http:// schemas.android.com/apk/res/android"
package="com.geeksforgeeks.myapplication">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

Java Folder

● The Java folder contains all the java and Kotlin source code (.java)
files that we create during the app development, including other
Test files.
● If we create any new project usingJava, by default the class file
MainActivity.java file

package com.geeksforgeeks.myapplication;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}

res/drawable folder
● It contains the different types of images used for the development
of the application.
● We need to add all the images in a drawable folder for the
application development.

res/layout folder
● The layout folder contains all XML layout files which we used to
define the user interface of our application.
● It contains the activity_main.xml file.

<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http:// schemas.android.com/apk/res/android"
xmlns:app="http:// schemas.android.com/apk/res-auto"
xmlns:tools="http:// schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

mipmap folder
● This folder contains launcher.xml files to define icons that are used
to show on the home screen.
● It contains different density types of icons depending upon the size
of the device such as hdpi, mdpi, xhdpi.

Gradle Scripts folder


● Gradle means automated build system and it contains a number of
files that are used to define a build configuration that can be
applied to all modules in our application.
● In build.gradle there are buildscripts and in build.gradle (Module)
plugins and implementations are used to build configurations that
can be applied to all our application modules.

You might also like