Professional Documents
Culture Documents
CH 4
CH 4
Text View
• Attributes
• android:capitalize- specifies that the TextView has a textual input method and
should automatically capitalize what the user types
• Values
• android:inputType – the type of data being placed in the textfield. Phone, Date, Time,
Number, Password etc
• android:password – whether this text field’s values are to be displayed as password dots
instead of the string. Values – true, false
• android:textStyle –bold, italic or bolditalic for the input text. Values – 0-normal, 1- bold,2-
italic(| can be used for combination)
Example
Edit Text
• android:autoText - If set, specifies that this TextView has a textual input method and
automatically corrects some common spelling errors.
• android:id -ThisA button is a push button that can be pressed/clicked, by the user to perform
some type of action
• android:onClick - This is the name of the method in this View's context to invoke when the
view is clicked.
Radio Button
• Radio buttons allow the user to select one option from a set
• In RadioGroup, checking one radio button out of several radio buttons added in it will
automatically uncheck all the others.
• It means at a time one can check only one radio button from a group of radio buttons which
belong to same radio group
• If a radio button is unchecked then a user can check it by simply clicking on it.
• Once a RadiaButton is checked by user it can’t be unchecked by simply pressing on the same
button.
• Attributes
• Android:checked – to specify the status of the radio button values – false/ true
Check Box
• Check-boxes should be used when presenting users with a group of selectable options that
are not mutually exclusive.
• Attributes
• Eg: When something is uploaded or downloaded from the internet, it is better to show the
progress of download/upload to the user.
• Progress bar supports two modes to represent progress: determinate, and indeterminate.
• Indeterminate mode for the progress bar is to be used when the duration of the operation is
not known.
• Indeterminate mode is the default for progress bar and shows a cyclic animation without a
specific amount of progress indicated.
• Use determinate mode for the progress bar when one wants to show the specific quantity of
progress that has occurred.
• Indeterminate bar
• Determinate bar to show 25% progress