ANDROID:ID specifies the appropriate ID for the control.
ANDROID:TEXT Specifies the text that is displayed in the control, it is important to note that the string in the Strings.xml file is used as much as possible.
ANDROID:TEXTSIZE Specifies the size of the font in the control.
ANDROID:BACKGROUND Specifies the background color or background image used by the control, and the RGB nomenclature.
ANDROID:WIDTH Specifies the width of the control.
Android:height Specifies the height of the control.
Android:sigleline if set to True, the contents of the control are displayed in the same row.
Android:scaletype is the size that controls how the picture resized/moved to match the ImageView.
Android:hint sets the prompt information in the input box when the EditText is empty.
Android:linearlayout it determines the direction of the LinearLayout, and its value can be vertical, which represents the vertical layout horizontal, which represents the horizontal layout.
android:gravity Specifies the alignment of the view component, such as centering, right, etc., which refers to the position of the text in the control, not the control itself.
Android:layout_gravity (differs from: android:gravity) Specifies the alignment of the container component. For example, a button in the LinearLayout, you want to put the button on the left, right and other positions can be set by this property. Take button As an example, android:layout_gravity= "right" button on the left.
ANDROID:LAYOUT_WIDTH Specifies the width of the container component, you can set the value in addition to Fill_parent and wrap_content, you can also set an exact value, in pixels or DP (DIP).
Android:layout_height Specifies the height of the container component.
Android:layout_weight proportional space, refers to two or more controls to occupy equal proportions of the area, for example, there are 3 buttons, requires 1/3 in the horizontal direction of the length of the 3 control can be android:layout_ The weight property is set to an equal of 3 values.
Android:layout_centerhrizontal the current control is located in the middle of the horizontal direction of the parent control's horizontal position.
Android:layout_centervertical the current control is in the vertical middle position of the parent control (in the middle of the vertical direction).
Android:layout_centerinparent is completely centered relative to the parent control.
Android:layout_alignparentbottom The lower end of the current control is aligned with the low end of the parent control.
Android:layout_alignparentleft aligns the left edge of the current control with the left edge of the parent control.
Android:layout_alignparentright the right edge of the current control is aligned with the right edge of the parent control.
Android:layout_alignparenttop the top of the current control aligns with the top of the parent control.
android:layout_alignwithparentifmissing if the corresponding sibling element cannot be found, the parent element is the reference.
Android:layout_below causes the current control to be located below the given ID control.
Android:layout_above causes the current control to be positioned above the given ID control.
Android:layout_toleftof causes the current control to be on the left side of the given ID control.
Android:layout_torightof causes the current control to be positioned to the right of the given ID control.
Android:layout_aligntop aligns the top edge of this control with the top edge of a control.
Android:layout_alignleft aligns the left edge of this element with the left edge of an element.
Android:layout_alignbottom aligns the bottom edge of this element with the bottom edge of an element.
Android:layout_alignright aligns the right edge of this element with the right edge of an element.
Android:layout_margin sets the distance from the control to the adjacent control or edge (up or down).
Android:layout_marginbottom sets the distance of the control to the bottom edge of the adjacent control.
Android:layout_marginleft sets the distance of the control to the left edge of the adjacent control. Android:layout_marginright sets the distance of the control to the right edge of the adjacent control. Android:layout_margintop sets the distance from the control to the top edge of the adjacent control.
Android:padding sets the distance of the control's contents from the edge of the control in 4 directions, specifying the padding for the control, that is, the contents of the control.
Android:paddingleft the distance of the control content from the right edge of the control. Android:paddingright the distance of the contents of this control from the top edge of the control.
Two.
Property
Value
Description
Android:orientation
Horizontal/vertical
Sets whether the layout is horizontal or vertical, the default is vertical
Android:checked
True/false
The tag is selected by default and the last one is selected if it is a radio
Android:layout_gravity
Center/right/left/bottom/top
Position
Android:gravity
Center/right/left/bottom/top
Location (The Android:gravity property is the qualification for the view content.) For example, a button above the text. You can set the text on the left side of the view, on the right, and so on. This property is done with this. Android:layout_gravity is used to set the position of the view relative to the parent view. For example, a button in the LinearLayout, you want to put the button on the left to the right and so on can be set by this property. )
Android:hint
@string
Prompt message, display when text box is empty
Android:numeric
Integer/decimal
Only integers/decimals can be entered
Android:singleline
True/false
Set single-line input, once set to True, text does not wrap automatically
Android:password
True/false
Set Password box
Android:textcolor
Ffffff
Font Color
Android:textstyle
Bold/italic/bolditalic
Set glyph [Bold (bold) 0, Italic (italic) 1, bolditalic (coarse and oblique) 2] can be set one or more, separated by "|"
Android:textsize
20dip
Font size
Android:capitalize
Characters
Sets the English letter capitalization type. No effect here, need to pop input method to see
Android:textalign
Center/right/left
Set the text display position, EditText does not have this property, but TextView has
Android:autotext
True/false
If set, the spelling correction of the input values will be performed automatically. There is no effect here, it works when the input method is displayed and entered.
Android:editable
True/false
Whether it can be edited
Android:textcolorhighlight
Ffffff
The background of the selected text
Android:textcolorhint
Ffffff
Sets the color of the message text, which is grayed out by default
Android:textscalex
1.5
Control the spacing between words and words
Android:typeface
Normal/sans/serif/monospace
Android:background
@null
Space background, not here, refers to transparency, remove the EditText custom background
Android:layout_weight
1
Weights, which control the position between controls, are useful when controlling the size of the control display.
Android:textappearance
Textappearancebutton, Textappearanceinverse, Textappearancelarge, Textappearancelargeinverse, TextAppearanceMedium , Textappearancemediuminverse, Textappearancesmall, Textappearancesmallinverse
Sets the appearance of text. As "? Android:attr/textappearancelargeinverse" here refers to the system comes with an appearance,? Indicates whether the system has this appearance, otherwise the default appearance is used.
Android:autolink
None, Web, email, phone, map, all
Sets whether text is displayed as a clickable link when the text is a URL link/email/phone number/map.
Android:cursorvisible
True/false
Set the cursor to show/hide and display by default.
Android:digits
1234567890.+-*/%\n ()
Sets which characters are allowed to be entered.
Android:drawablebottom
Output a drawable, slice, below the text. If you specify a color, the background of text is set to that color, and the latter is overridden when used with background.
Android:drawableleft
Output a drawable on the left side of text, slice.
Android:drawableright
On the right side of text, output a drawable, slice.
Android:drawabletop
Output a drawable, a slice, directly above the text.
Android:drawablepadding
Sets the interval between text and drawable (picture), used with Drawableleft, Drawableright, Drawabletop, Drawablebottom, and can be set to negative numbers, with no effect on its own.
Android:editorextras
Specifies an extension for a specific input method, such as "Com.mydomain.im.SOME_FIELD". Source tracking to Editorinfo.extras, no relevant implementation code.
Android:ellipsize
Start, end, middle, marquee
Sets how the control is displayed when the text is too long. The following values are set: the "Start" ellipsis appears at the beginning; "End" ellipses appear at the end; "Middle" ellipses appear in the middle; "Marquee" is displayed as a marquee (animation moves Sideways)
Android:freezestext
True/false
Set the contents of the saved text and the position of the cursor, and then to the corresponding activity with the following two methods, the implementation method of the website to find, here is not detailed description.
Android:imeoptions
Normal,actionunspecified,actionnone,actiongo,actionsearch,actionsend,actionnext,actiondone,flagnoextractui, Flagnoaccessoryaction,flagnoenteraction
Sets the enter key for the soft keyboard. Use ' | ' to set multiple.
Android:imeactionid
Sets the IME action ID and captures the judgment in oneditoraction for logical operation.
Android:imeactionlabel
Sets the IME action label. However, it is not guaranteed to be used, but it should be useful when the input method is extended.
Android:includefontpadding
True/false
Sets whether the text contains extra white space at the top and bottom, which defaults to true.
Android:inputmethod
Specifying an input method for text requires a fully qualified name (full package name)
Android:inputtype
Sets the type of text that is used to help the input method display the appropriate keyboard type. The following values are set: None, text, textcapcharacters letter size, Textcapwords Word first letter size, textcapsentences only the first letter size, Textautocorrect, Textautocomplete Auto-complete, textmultiline multi-line input, Textimemultiline Input method multiple lines (if supported), textnosuggestions not prompt, textemailaddress e-mail address , Textemailsubject Mail subject, textshortmessage SMS (will be more than one expression button out), Textlongmessage long message? , textpersonname name, textpostaladdress address, textpassword password, textvisiblepassword visible password, textwebedittext as the text of the Web form, Textfilte Text filter filter, textphonetic pinyin input, numbersigned signed number format, Numberdecimal floating point format with decimal point, phone phone number, datetime date, Date day, Time.
Android:linksclickable
Sets whether the link clicks the connection, even if the Autolink is set
Android:maxlines
Sets the maximum number of lines of text to display, in combination with width or layout_width, beyond the partial wrap, beyond the number of lines that are not displayed
Android:minlines
Set the minimum number of lines of text
Android:linespacingextra
Sets the line spacing.
Android:phonenumber
True/false
Set the input method for the phone number.
Android:privateimeoptions
Provides additional input method options (string format).
Android:scrollhorizontally
True/false
If you set the text to exceed the width of the TextView, the horizontal pull bar appears.
Android:selectallonfocus
If the text is selectable, let him get the focus instead of moving the cursor to the beginning or end of the text.
Android:shadowcolor
Specifies the color of the text shadow, which needs to be used with Shadowradius.
Android:shadowradius
Sets the radius of the shadow. Set to 0.1 to become the color of the font, generally set to 3.0 effect is better.
Android:shadowdx
Sets the start position of the shadow's horizontal coordinates.
Android:shadowdy
Sets the start position of the shadow vertical coordinates.
Android:textcolorlink
Ffffff
The color of the text link.
Android:maxheight
Set the maximum height of the text area
Android:minheight
Set the minimum height of the text area
Android:maxwidth
Set the maximum width of the text area
Android:minwidth
Set the minimum width of the text area
Android:clickable
True/false
View is able to respond to the Click event
Android:onclick
When the view is click, which method of the context of the view is called. Usually this context refers to the activity where the view is located. For example: android:onclick= ' SayHello ', then the corresponding activity has a method public void SayHello (view view) method, when the view is click, The SayHello method is called.
Android:longclickable
True/false
Whether the view can react to a long-time click event.
Android:focusable
Whether the view responds to focus events
Android:cachecolorhint
00000000
When scrolling, the list of view redraw, using the system is still the default transparent color, color value of #ff191919, to change this situation, only need to call the ListView setcachecolorhint (0), The color value is set to 0, or the properties of the ListView in the XML file are android:cachecolorhint= "#00000000", and when scrolling, there is no background color when redrawing the view.
Android:fadingedgelength
Sets the length of the border gradient