Android EditText Multi-line display and all properties

Source: Internet
Author: User

Android:id="@+id/editsms"Android:layout_width="fill_parent"Android:layout_height="wrap_content"Android:hint="@string/savesms"Android:inputtype="Textmultiline"android:gravity="Left|top"Android:minlines="6"/>Note: Android:inputtype="Textmultiline"//can display multiple linesandroid:gravity="Left|top"//upper left corner of cursor at inputandroid:minlines="6" //Minimum display 6 rows
android:layout_gravity="center_vertical"//sets the location of the control's display: Default top, centered here, and bottomAndroid:hint="Please enter a number! "//set up a message to display on spaceAndroid:numeric="integer"//The setting can only enter integers, if it is a decimal: decimalAndroid:singleline="true"//sets the single-line input, and once set to True, the text is not wrapped automatically. android:gray="Top" //multi-line pointer on first row first positionEt.setselection (Et.length ());//adjust the cursor to the last lineAndroid:autotext//automatic spelling HelpAndroid:capitalize//Capitalize first letterAndroid:digits//set to accept only certain numbersAndroid:singleline//whether a single line or multiple rows, enter is to leave the text box or text box to add a new lineAndroid:numeric//Accept numbers onlyAndroid:password//PasswordAndroid:phonenumber//Enter phone numberAndroid:editable//whether it can be editedandroid:autolink= "All"//set Text hyperlink style when you click the URL, skip to the URLandroid:password="true"//set to enter password onlyAndroid:textcolor ="#ff8c00"//Font Colorandroid:textstyle="Bold"//font, bold, italic, BolditalicAndroid:textsize="20dip"//sizeAndroid:capitalize ="characters"//write in uppercase lettersandroid:textalign="Center"//EditText does not have this attribute, but TextView hasandroid:textcolorhighlight="#cccccc"//the background of the selected text, which is blue by defaultAndroid:textcolorhint="#ffff00"//sets the color of the message text, which is grayed out by defaultandroid:textscalex="1.5"//control the spacing between words and wordsAndroid:typeface="monospace"//font, Normal, sans, serif, monospaceAndroid:background="@null"//space background, not here, refers to transparentandroid:layout_weight="1"//weights are useful when controlling the size of the control display. Android:textappearance="? android:attr/textappearancelargeinverse"//text appearance, which refers to the system comes with a look,? Indicates whether the system has this appearance, otherwise the default appearance is used. I don't know if I understand that, right? Property Name Description Android:autolink Set if text is a URL link/email/the phone number/map, the text is displayed as a clickable link. Optional value (none/web/email/phone/map/All ) Android:autotext if set, the spelling correction of the input value will be performed automatically. There is no effect here, it works when the input method is displayed and entered. ANDROID:BUFFERTYPE Specifies the text category that is obtained by the GetText () method. The option editable is similar to the StringBuilder append character, which means that the Append method can be called to set the text content after gettext. Spannable can use the style in a given character area, see here 1, here 2. Android:capitalize set the English letter capitalization type. There is no effect here, you need to pop up the input method to see, see EditView this property description. Android:cursorvisible set cursor to display/hidden, displayed by default. Android:digits sets which characters are allowed to be entered. such as "1234567890.+-*/%() "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 on the left side of the text output a drawable, slice. Android:drawablepadding sets the spacing between text and drawable (picture), used with Drawableleft, Drawableright, Drawabletop, Drawablebottom, Can be set to negative, no effect is used alone. Android:drawableright output a drawable on the right side of the text, a piece. The android:drawabletop outputs a drawable, a slice, directly above the text. Android:editable whether the settings are editable. There is no effect here, see EditView. Android:editorextras sets the additional input data for the text. discussed again in EditView. Android:ellipsize sets how the control is displayed when the text is too long. The following values are set: "Start"-The ellipsis appears at the beginning; End "--the ellipsis appears at the end; Middle "--The ellipsis appears in the middle; Marquee "--Display as a marquee (animated lateral movement) Android:freezestext sets the contents of the saved text and the position of the cursor. See also: here. Android:gravity set the text position, as set to "center", the text will be centered. Android:hinttext the text message that is displayed when empty, you can set the color of the hint information by Textcolorhint. This property is used in EditView, but can also be used here. Android:imeoptions additional functions, set the action associated with the edit box in the lower right corner of the IME action, such as the lower right corner of the Actiondone will display a "done" instead of the default is a carriage return symbol. This is explained in detail in EditView, which is useless here. Android:imeactionid Set the IME action ID. In EditView again to do the instructions, you can read this post: here. Android:imeactionlabel Set the IME action label. Explain it again in EditView. Android:includefontpadding sets whether the text contains extra white space at the top and bottom, which defaults to true. ANDROID:INPUTMETHOD specifies the input method for text and requires a fully qualified name (the full package name). For example: Com.google.android.inputmethod.pinyin, but the error is not found here. Android:inputtype sets the type of text that is used to help the input method display the appropriate keyboard type. Detailed in the EditView, there is no effect here. Android:linksclickable sets whether the link clicks the connection, even if Autolink is set. Android:marqueerepeatlimit sets the number of repetitions that are repeated when the ellipsize is specified marquee, when set to Marquee_forever. Android:ems sets the width of the TextView to n characters. This is tested as a character width of Chinese characters, and Android:maxems sets the width of the textview to a maximum of n characters. Overwrite EMS option when used with EMS. Android:minems sets the width of the textview to a minimum of n characters. Overwrite EMS option when used with EMS. Android:maxlength limits the length of text that is displayed, and the excess portion is not displayed. Android:lines sets the number of lines of text, two lines are displayed, even if the second row has no data. Android:maxlinES sets the maximum number of lines of text to display, in combination with width or layout_width, beyond the partial wrap, and the number of lines beyond will not be displayed. Android:minlines sets the minimum number of lines of text, similar to lines. Android:linespacingextra sets the line spacing. Android:linespacingmultiplier sets the multiple of line spacing. such as1.2If the android:numeric is set, the TextView has a digital input method. It is useless here, the only effect after setting is TextView has the click Effect, this property will be explained in detail in Edtiview. Android:password with a small dot "." Displays the text Android:phonenumber set as the input for the phone number. Android:privateimeoptions setting IME options is useless here, and will be discussed further in EditText. android:scrollhorizontally if the text exceeds 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. No effect after setting in TextView. ANDROID:SHADOWCOLOR Specifies the color of the text shadow, which needs to be used with Shadowradius. Effect: ANDROID:SHADOWDX Sets the start position of the shadow horizontal coordinates. Android:shadowdy sets the start position of the shadow vertical coordinates. 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:singleline sets the single-line display. If used with Layout_width, when the text cannot be displayed in its entirety, it is followed by "...". such as Android:text="test_ Singleline"Android:singleline="true"Android:layout_width="20DP"only "t ..." will be displayed. If you do not set Singleline or set to False, the text wraps Android:text setting the display text. ANDROID:SHADOWDX sets the start position of the shadow's horizontal coordinates. Android:shadowdy sets the start position of the shadow vertical coordinates. 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:singleline sets the single-line display. If used with Layout_width, when the text cannot be displayed in its entirety, it is followed by "...". such as Android:text="test_ Singleline"Android:singleline="true"Android:layout_width="20DP"only "t ..." will be displayed. If you do not set Singleline or set to False, the text wraps Android:text the text is set. Android:textsize set the text size, recommended unit of measure "SP", such as "15sp" Android: TextStyle setting glyphs [Bold (bold)0, Italic (Italic)1, bolditalic (coarse and oblique)2] You can set one or more, using the |"Separates Android:typeface sets the text font, which must be one of the following constant values: normal0, sans1, serif2, monospace (equal width font)3]android:height Setting the height of the text area, support measurement: px (pixels)/dp/sp/inch/mm (mm) Android:maxheight set the maximum height of the text area Android:minheight set the minimum height of the text area Android:width set the width of the text area, support unit of measure: px (pixels)/dp/sp/inch/mm (mm), see here for differences with Layout_width. Android:maxwidth sets the maximum width of the text area android:minwidth the minimum width of the text area android:textappearance set the text appearance. such as "? android:attr/textappearancelargeinverse "Is this a look that comes with the system?indicates whether the system has this appearance, otherwise the default appearance is used. The values you can set are as follows: Textappearancebutton/textappearanceinverse/textappearancelarge/textappearancelargeinverse/textappearancemedium/Textappearancemediuminverse/textappearancesmall/Textappearancesmallinverseandroid:textappearance to set the appearance of text. such as "? android:attr/textappearancelargeinverse "Is this a look that comes with the system?indicates whether the system has this appearance, otherwise the default appearance is used. The values you can set are as follows: Textappearancebutton/textappearanceinverse/textappearancelarge/

Android EditText Multi-line display and all properties

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.