Ilt MD 04 H

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Abstract

ILT-MD-04-H

This class learns about Activity and intents where before learning this class it is expected
that you have passed or at least already know about the Kotlin programming language and the
solid principle because that is the basis of this class, first before we start making the first
application from Kotlin we have to install an application whose name is Android Studio where
we have to make sure the requirements of our laptop before installing Android Studio are
sufficient where the Operating System can use Windows, Mac or Linux, with a minimum random
access memory of 4 gigabytes with a recommendation of 8 gigabytes, with a disk available of at
least 2 gigabytes with a recommendation of 4 gigabytes , and a resolution of 1280 x 800, where
this minimum requirement is made to ensure that android studio runs well and is comfortable in
making android applications and also ensures that gradle is for, first we open android studio
then click Create New Project then select a Create a project template, in this case we select an
empty activity, then configure your project, here we determine the project name, package name,
storage space and minimum SDK, we choose the minimum SDK from the api level where
Android is now at api level 30 or can called android 11 with version_code R. after that we will
enter the project structure where we can see the android manifest where it is used to configure
permissions, activities and launchers, next is the Contain source code where it is a collection of
activity classes and fragments as the main logic in the application, Next, Ui testing is used for
testing Ui, next is unit testing is used for testing of the application itself, then the drawable is
used to store image resources, then there is a layout used to store resource layouts, then
values ​package where color resources, dimension resources, text are stored inside.resources
and theme and style resources, then there is a gradle script in which there is a build.gradle
which contains the libraries needed in this project, a minimum of sdk and versioncode, then
there is a gradle-wreapper-properties in which we can change the version of gradle then there
also gradle.properties which in it is used to configure JVM, jetifier, andoridx and style code. To
run our application to the toolbar, we choose the target device that we choose to run the
application, either from the Android Studio itself with an emulator or a direct connection with a
smartphone. Next, we will learn about the activity in which the activity has a main component,
namely Mainactivity in the main package which is useful for logical code, the second is
activity_main.xml which is in res-> layout which is to set the layout view of the main activity.
What we can see in the Layout editor in android studio. Layout is made of xml where the
components consist of an opening tag, self-closing tag and closing tag, in xml there are also
attributes consisting of property name and property value. The activity itself is a component that
is directly related to the user where in the activity there is a display and life cycle which includes
oncreate, onstart, onpause, onstop, onrestart, on resume, onstop and on destroy. In the activity we
can find the component in the layout with findViewById (), findViewById () will look for the
component in the layout based on its id, there is an onsaveinstancestate function which is used to
store the state so when rotating from portrait to landscape the data is not lost. The second lesson
is that intents are used to move activities and also send data or messages from another app
component, there are explicit and implicit intents, where explicit is used in the application and
implicit is used to communicate with outside applications.

You might also like