Common attributes of Android Development
1. Add spaces in the middle of android string. xml text
Tips for adding spaces before and after android string. xml
<String name = "password"> password & #160; & #160; & #160; & #160; Code </string>
& #160 this represents a space
2. Single line display
Single-row display and input of TextView and EditView in the layout file of android layout
<TextView android: singleLine = "true"/>: displays a single text line.
<EditView android: singleLine = "true"/>: enter a single line in the text input box.
Android: singleLine = "true" Single Row display
3. attributes of the EditView input box
EditView Password Input and digital input control in the android layout File
<EditView android: password = "true"/>: the input data in the text input box is not directly displayed.
<EditView android: numeric = "integer"/>: the input data in the text input box can only be numbers.
Android: numeric = "integer" digital input control, android: password = "true": password content hidden
4. Prompt for EditView input content
Prompt for EditView input in the layout file of android layout
<EditView android: hint = "@ string/input_pwd"/>: displays the prompt content in the text input box.
Android: hint = "@ string/input_pwd" when the input box gets the focus, the content displayed by default disappears.
5. EditView input length control
EditView input length control in the android layout File
<EditView android: minLength = "5"/>: sets the minimum input value of the text input box.
<EditView android: maxLength = "10"/>: sets the maximum input value of the text input box.
MinLength and maxLength: input length control
6. Control the display of controls
Display Control in the layout file of android layout
Android: visibility = "gone": the control disappears.
Android: visibility = "invisible": the control is invisible but exists.
Android: visibility = "visible": controls are displayed normally. Default Value:
7. layout control in layout files
Layout control of RelativeLayout, LinearLayout, and ListView
Android: orientation = "vertical": vertical layout
Android: orientation = "horizontal": horizontal layout
8. Horizontal and vertical screen display
Android AndroidManifest. xml file sets the application display direction
Android: screenOrientation = "portrait": portrait display
9. untitled Control
Android AndroidManifest. xml file sets no title for Activity
Android: theme = "@ android: style/Theme. NoTitleBar": the title is not displayed.