Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to solve the problem of broken line display of Textview in Android?
How to solve the problem of broken line display of Textview in Android?
What's your specific question? How to get him to wind the wire? I found some textview properties for you:

Android:ems sets the width of TextView to the width of n characters.

Android:maxems sets the width of TextView to a maximum of n characters. Overrides the ems option when used with ems.

Android:minems sets the width of TextView to at least n characters. Overrides the ems option when used with ems.

Android:maxLength limits the number of characters entered. If set to 5, only 5 Chinese characters/numbers/English letters can be entered.

Android:lines sets the number of lines of text. If two lines are set, two lines will be displayed, even if there is no data in the second line.

Android:maxLines sets the maximum number of lines of displayed text, which is used in combination with width or layout_width. Extra lines will wrap automatically and 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 as "1.2"

Android:numeric If set, the text view has a numeric input method. The following values are set: integer positive integer, signed integer and decimal floating point number.

Android: Password displays text with a dot "."

Android:phoneNumber is set as the input method of phone number.

Android:singleLine sets the single-line display. If used with layout_width, when all the text cannot be displayed, it will be followed by "…". For example, Android: text = "test _ singleLine" Android: singleline = "true" Android: layout _ width = "20dp" only "t…" will be displayed. If Singleline is not set or set to false, the text will wrap automatically.

Android:textAppearance sets the appearance of the text. Like "? Android: Attr/TextAppercelargeInverse "refers to an appearance that comes with the system. Indicates whether the system has this appearance, otherwise the default appearance will be used. The values that can be set are as follows: textappendancebutton/textappendancesinversion/textappendancelable/textappendancelable inverse/textappendancemediumversion/textappendancesismall/textappendancesmallversion.

Android:textColor sets the text color

Android:textColorHighlight the background color of the selected text is blue by default.

Android:textColorHint sets the color of the prompt text, which is gray by default. Used with hint.

Android: the color of the text link.

Android:textScaleX sets the interval between words. The default value is 1.0f, as shown in the screenshot of TextView.

Android:textSize sets the text size, and the recommended unit of measurement is "sp", such as "15sp".

Android:textStyle can set one or more glyphs [bold (bold) 0, italic (italic) 1, bolditalic (bold italic) 2], separated by |.

Android:typeface sets the text font and must be one of the following constant values: normal 0, sans 1, serif 2, monospace 3].

Android:height sets the height of the text area, and supports the unit of measurement: px (pixel) /dp/sp/in/mm (millimeter).

Android:maxHeight sets the maximum height of the text area.

Android:minHeight sets the minimum height of the text area.

Android:width sets the width of the text area, and supports the unit of measurement: px (pixel) /dp/sp/in/mm (millimeter). For the difference with layout_width, please see here.

Android:maxWidth sets the maximum width of the text area.

Android:minWidth sets the minimum width of the text area.

Transfer from csdn

I hope it helps you.