Professional Documents
Culture Documents
20BCS7550 Yash MAD Lab 2
20BCS7550 Yash MAD Lab 2
Experiment-1.2
Student Name: Yash Gautam UID: 20BCS7550
Branch: BE(CSE) Section/Group: 20BCS-KRG-DM2/B
Semester: 6th Date of Performance: 02-03-23
Subject Name: MAD LAB Subject Code: 20CSP-356
• Provide the following information: Application name, Project location and Package name of
application and click next.
• After finishing the Activity configuration, Android Studio auto generates the activity class and
other required configuration files.
• Now an android project has been created. You can explore the android project and see the simple
program.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:textSize="20pt"
android:textColor="#00FF0A"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
File: MainActivity.java
package com.example.helloworld;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
To run the android application, click the run icon on the toolbar or simply press Shift + F10.
Now, we can launch apps from Android Studio onto our device:
1. Select one of your projects and click "Run" from the toolbar.
2. In the "Choose Device" window that appears, select the "Choose a running device" radio
button, select the device, and click OK.