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

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment 2.2
Student Name: Kaustabh Pal UID: 21BCS8791
Branch: CSE Section/Group: SC-905(B)
Semester: 6th Date of Performance: 21-02-24
Subject Name: MAD LAB Subject Code: 21CSH-355

1. Aim: Create an Android App using various controls such TexEdit, CheckBox,
RadioButton, RadioGroup, etc.

2. Objective: The objective of an Android app using various controls


such as EditText, CheckBox, RadioButton, and RadioGroup could be to
create a user interface that involves user input, selection, and interaction
with different types of controls. This type of app aims to showcase the
usage and functionalities of these UI elements to enhance the user
experience.

3. Input/Apparatus: IDE, Android SDK, JDK, Android Virtual


Device or Physical Android Device

4. Procedure:
Steps:-
Step 1: First, create a new Android Studio project and add the following code to
your activity_main.xml layout file
Step 2: Update the styles.xml and color.xml files

Step 3: Then, in the MainActivity.java file, add the following code to handle interactions
with these controls
Step 4: This code sets up the UI with EditText, CheckBox, RadioButtons, and a Button
in the MainActivity. When the Submit button is clicked, the submitForm() method is
called, which retrieves the input from the controls and displays a Toast message with the
entered name and selected gender if all the required fields are filled and the terms are
accepted.

You might also like