MAD Chapter 4 Test
MAD Chapter 4 Test
b) Define the purpose of a Toggle Button and state one practical use case.
**[2M]**
d) Name any four methods associated with the Progress Bar in Android.
**[2M]**
f) Define Custom Toast Alert and list one advantage of using it. **[2M]**
g) State the purpose of a Time Picker and name one method to retrieve the
selected time. **[2M]**
a) Write an XML code snippet to create a simple form with a Text View
(label), Edit Text (input), and Button using Linear Layout. **[4M]**
b) Explain the difference between List View and Grid View with one
example use case for each. **[4M]**
c) Describe how to implement a Date Picker in an Android application and
provide a Java code snippet to display the selected date in a Text View.
**[4M]**
a) Write a program to create a Radio Group with three Radio Buttons (e.g.,
"Red," "Green," "Blue") and display the selected option in a Custom Toast
Alert. (Write only Java code.) **[4M]**
b) Explain the Progress Bar with its key attributes and write a Java code
snippet to increment its value from 0 to 100 over 5 seconds. **[4M]**
b) Write a program to create a List View with five items (e.g., fruits) and
show a Custom Toast Alert when an item is clicked. (Write only Java code.)
**[4M]**
2
c) Explain the Grid View component and provide an XML example with a
2x3 layout of Image Views. **[4M]**
b) Write a program to capture the current time using a Time Picker and
display it in a Text View when a Button is clicked. Include a Custom Toast
Alert to confirm the action. (Write XML and Java code.) **[6M]**
3
c) Develop an application to select a date using a Date Picker and display it
in a Text View within a Scroll View. Include a Progress Bar that fills up
while the date is being set. (Write XML and Java code.) **[6M]**