Professional Documents
Culture Documents
Exp 2.2
Exp 2.2
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.
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.