17 Questions
How is a Button created in Android UI?
Using the tag
What is the primary function of an EditText in Android UI?
To allow user input in the form of text
What does a TextView do in Android UI?
Display static text
Which attribute is used to set the right side position of a widget in a RelativeLayout?
android:layout_toRightOf
What is the default orientation of a LinearLayout in Android UI?
Horizontal
What is the purpose of android:gravity attribute in Android UI?
To set the position for child elements
What attribute allows us to set the default selection for a RadioButton?
android:checked
In Android development, what is used to handle multiple selections in CheckBoxes by default?
No special group is needed
What method is used to retrieve the selected RadioButton in a RadioGroup?
getCheckedRadioButtonId()
In Android CheckBoxes, what is incremented when a checkbox is checked?
fee
To display an image using an ImageView in Android, which attribute is used?
android:src
What is the purpose of 'android:hint' attribute in EditText?
To specify predefined text displayed when the EditText is blank
Which attribute is used in Android to set the text color of a TextView?
android:textColor
What does the 'btnclrobj' in the Java code represent?
An object for clearing EditText fields
What is the primary function of a RadioGroup in Android?
To allow single selection from RadioButtons
Which attribute is used to specify the layout width in Android?
android:layout_width
What does the 'inputType' attribute do in EditText?
Allows specific input like Number or Email
Test your knowledge on how to set default selection for RadioButton in Android using the 'checked' attribute in XML and Java code.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free