Wednesday, February 12, 2020

Project Structure (Android Studio)

As a start we discussed the Android Studio project structure. When we create an application project with Android Studio, we will get several packages, folders, and files that are in the project. To be able to see the structure of the project, we must first create a project with Android Studio. Please create a project and fill in the name of the project that we will create.

1. First open the Android Studio application. Select Start a new Android Studio project, after which the following picture will appear.

Select Start a new Android Studio Project

2. Fill in the name and press the Next button. Then it will be redirected to the next page as shown below.

Fill in the name of the Application

3. Check the phone and tablet (this is because we build applications used for mobile phones and tablets) and select the minimum SDK. Here I use the minimum SDK API 15 Android 4.0.3 (meaning the application features that we make support Android v4.0.3 and above). Then press the Next button.

Complete Application data

4. At this stage you will be asked to choose a template that will be used in building the application. Since we are going to start from the basics, it is recommended to choose the Empty Activity template. Then press Next.

Choose a template

5. Fill in the name of the activity that we will use. The name is up to you. After that press Finish and wait a few moments.

Fill in the name of the Activity

6. Creating a project with Android Studio is complete.

Android Studio Project Structure

7. Following is the picture along with an explanation of the Android Studio project structure that I have tried to make above.

Android Studio Project Structure

The explanation of the structure is as follows:

Manifest (app / manifest / AndroidManifest.xml)
The first manifest folder contains the AndroidManifest.xml file. This file contains components from applications such as activity, services, user permissions, content providers, and others.

Java (app / packagename / MainActivity.java)
The second folder, java, contains command files with java extension. In it there is also a java activity class file that is in the application.

res
This folder contains drawables, layouts, mipmaps, and values. Drawable contains a collection of images that we will use in the application. Layout is a place where the application's layout design file is located. Mipmap contains icons that we will use in the application, and values ​​are places to store files such as colors, color strings (text data declarations that we will use for application components), and styles (contain resources about themes such as toolbar names) .

Gradle
Is a build tool used to run Android Studio applications. The build.gradle file is used to identify the OS, SDK, and library versions that we will use in building applications.

Read: https://knowledgefrans.blogspot.com/2020/02/widgeting-android-studio.html?m=1


No comments:

Post a Comment

ENGLISH PHRASES

YOUTUBE   ENGLISH PHRASES  no one said it was to be going easy.  tidak ada yang mengatakan itu akan berjalan mudah.  that wasn't the re...