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

MAD Chapter 4 Test

The document is a test for an Android development course, consisting of multiple sections with questions on various UI components and functionalities such as Edit Text, Toggle Button, Progress Bar, and more. It includes tasks requiring XML and Java code snippets for creating UI layouts and implementing features like List Views, Date Pickers, and Custom Toast Alerts. The test is structured to assess understanding through practical coding exercises and theoretical explanations.

Uploaded by

vawagav635
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)
6 views4 pages

MAD Chapter 4 Test

The document is a test for an Android development course, consisting of multiple sections with questions on various UI components and functionalities such as Edit Text, Toggle Button, Progress Bar, and more. It includes tasks requiring XML and Java code snippets for creating UI layouts and implementing features like List Views, Date Pickers, and Custom Toast Alerts. The test is structured to assess understanding through practical coding exercises and theoretical explanations.

Uploaded by

vawagav635
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

MAD Chapter 4 Test

#### 1. Attempt any FIVE of the following: **[10 Marks]**

a) List any four attributes of an Edit Text control in Android. **[2M]**

b) Define the purpose of a Toggle Button and state one practical use case.
**[2M]**

c) Differentiate between a Checkbox and a Radio Button (any two points).


**[2M]**

d) Name any four methods associated with the Progress Bar in Android.
**[2M]**

e) Explain the role of a Scroll View in Android UI design. **[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]**

#### 2. Attempt any THREE of the following: **[12 Marks]**

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]**

d) Compare the functionality of a Button and an Image Button, highlighting


their attributes (any four points). **[4M]**

#### 3. Attempt any THREE of the following: **[12 Marks]**

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]**

c) Describe the Image View component and provide an XML example to


display an image with specific width and height attributes. **[4M]**

d) Write an XML code snippet to design a UI with a Scroll View containing


five Text Views stacked vertically. **[4M]**

#### 4. Attempt any THREE of the following: **[12 Marks]**

a) Develop an Android application to toggle between two states (e.g.,


"ON" and "OFF") using a Toggle Button and display the state in a Text
View. (Write XML and Java code.) **[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]**

d) Develop an application to simulate a file download using a Progress Bar


and display a completion message in a Custom Toast Alert. (Write only
Java code.) **[4M]**

#### 5. Attempt any TWO of the following: **[12 Marks]**

a) Develop an Android application to perform addition and subtraction of


two numbers entered in Edit Text fields using Buttons. Display the result in
a Text View. (Write XML and Java code.) **[6M]**

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]**

c) Design an application with a Checkbox group (e.g., "Reading," "Writing,"


"Sports") and a Button to display all selected options in a Custom Toast
Alert. (Write XML and Java code.) **[6M]**

#### 6. Attempt any TWO of the following: **[12 Marks]**

a) Develop an application to display a 4x4 Grid View of numbers (0-15)


using Buttons. Show the clicked number in a Custom Toast Alert. (Write
XML and Java code.) **[6M]**

b) Write a program to create a simple image gallery using a Scroll View


containing five Image Views and corresponding Text View descriptions.
(Write XML code only.) **[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]**

You might also like