Question bank IAT 2
Question bank IAT 2
1. Explain the use of ProgressBar in Android. Write the XML and Java code to implement an
indeterminate horizontal ProgressBar.
2. What is AutoCompleteTextView? How is it implemented using an ArrayAdapter? Explain
with an example.
3. Define Spinner. How can a Spinner be implemented in Android using XML and Java code?
4. How is ListView different from Spinner? Write code to display a list of city names using
ListView.
5. Describe the steps to use GridView in Android. Provide an example showing a grid of
images.
6. What is ImageView in Android? Explain how to add and display an image using ImageView.
7. How does ScrollView work in Android? Explain with a layout that scrolls vertically.
8. What is a Custom Toast in Android? Explain how to create a Toast with a custom layout
using XML and Java code.
9. Define AlertDialog. How can we use the AlertDialog Builder class to create and display a
dialog with YES and NO options?
10. What is the use of TimePicker in Android? Write code to pick a time and display it in a
TextView.
11. Explain DatePickerDialog with an example of how to show a calendar and select a date.
12. Compare and contrast Toast, Custom Toast, and AlertDialog based on their use cases and UI
interaction.
Mod 2
Mod 3