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

Experiment-1 2

The document describes an experiment to design a basic Android application to display 'Hello Android' using Android Studio. It details setting up the development environment, creating a new project, configuring the project details, writing the code for the main activity and layout files, and running the application on an emulator.

Uploaded by

abbcs8544
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)
39 views4 pages

Experiment-1 2

The document describes an experiment to design a basic Android application to display 'Hello Android' using Android Studio. It details setting up the development environment, creating a new project, configuring the project details, writing the code for the main activity and layout files, and running the application on an emulator.

Uploaded by

abbcs8544
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

Experiment-1.

2
Student Name: Vasu Mehndiratta UID: 21BCS1452
Branch: BE-CSE Section/Group: CC-606-B
Semester: 6th Date of Performance:23/01/24
Subject Name: MAD Lab Subject Code: 21CSH-355

1. Aim: To design an Android application to display “Hello Android”.

2. Objective: Setting up Android Studio and configuring a basic Android project. Compiling and
running a simple Android application on an emulator or a physical device.

3. Input/ Apparatus Used:


Input:
Computer: Android Studio is compatible with Windows, macOS, and Linux. Ensure that your
computer meets the minimum system requirements for the chosen operating system. Internet
Connection: A reliable internet connection is required to download Android Studio and the necessary
SDK components during the installation process.
Internet Connection: A reliable internet connection is required to download Android Studio and the
necessary SDK components during the installation process.

Apparatus:
Android Studio Installer: Download the Android Studio installer from the official Android Studio
website (https://developer.android.com/studio). Choose the appropriate version for your operating
system.
Computer Mouse, Keyboard and Monitor/Display: Use a mouse and keyboard to interact with the
installation process, configure settings, and navigate through Android Studio. Android Studio
requires a monitor or display to visualize the installation process and subsequently to develop and
test Android applications.
Storage Space: Ensure sufficient free storage space on your computer to accommodate the Android
Studio installation and any additional SDK components you may download.
4. Procedure:
Step 1 - First step is to create a simple Android Application using Android studio. When you click on
Android studio icon, it will show screen as shown below
Step 2 - You can start your application development by calling start a new android studio project. in
a new installation frame should ask Application name, package information and location of the
project.
Step 3: Configure the Hello World Project Details We'll finish creating the project by configuring
some details about its name, location, and the API version it. Change the name of the application.
Change the default Project location to your preferred directory or just leave it as the default location.
Step 4: After done all above steps perfectly, you must get finish button and it can be open android
studio project with Welcome to android studio message.
Step 5: You can start your application development by calling start a new android studio project. in
a new installation frame should ask Application name, package information and location of the
project.

5. Source Code:
The Main Activity File
package com.example.helloworldapp; import
androidx.appcompat.app.AppCompatActivity; import
android.os.Bundle; public class MainActivity extends
AppCompatActivity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{ super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); }

The Layout 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!"
android:textSize="100px"
android:fontFamily="sans-serif-condensed-medium"
android:textColor="#ffffff"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

6. Result:

7. Learning Outcomes:
i). Successful setup of own virtual Android environment.
ii). Learning Android Architecture.
iii). Learned about the use of Java in Android Studio.

You might also like