All of the following controls only show the code of this control. The operation will be added to the original control.
1. TextView (text box ):
TextView is used to display text to users. This is the most basic view.
Running effect:
Android: background: Set the background color
Android: text sets the display content
Android: textColor: Set the font color
Android: layout_gravity sets the center display of the control
Android: textSize: Set the font size
Ii. EditText (edit box ):
EditText allows users to edit their text content.
Running effect:
Common attributes:
Android: numeric. You can enter the text type in the edit box.
Android: singleLine: Set single-line Input. If this parameter is set to true, the text will not wrap automatically.
Android: When the password is true, you can only enter a password.
Android: textScaleX sets the spacing between words.
Android: minLines sets the minimum number of lines of text.
Android: EMS sets the length of the text in the editing box.
3. Button ):
Button indicates the Button control.
Running effect:
Common attributes:
Android: onClick: Set the event method name.
Android: clickable: Set whether this button can be clicked. True indicates that click is allowed. False indicates that clicking is not allowed.
4. RadioGroup and RadioButton (single choice ):
We combine RadioGroup and RadioButton to complete the single-item selection function.
Running effect:
You can only select one of the multiple options.
5. CheckBox (multiple options ):
Running effect:
The difference between a multi-choice and a single-choice is that multiple options can be selected for multiple choices, and only one option can be selected for a single choice.