Skip to content

Commit a172b6e

Browse files
Gilles DebunneAndroid (Google) Code Review
authored andcommitted
Merge "Updated min/maxLines and singleLine documentation"
2 parents 05e8074 + e35a070 commit a172b6e

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

core/res/res/values/attrs.xml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,10 @@
29992999
<attr name="textColorLink" />
30003000
<!-- Makes the cursor visible (the default) or invisible. -->
30013001
<attr name="cursorVisible" format="boolean" />
3002-
<!-- Makes the TextView be at most this many lines tall. -->
3002+
<!-- Makes the TextView be at most this many lines tall.
3003+
3004+
When used on an editable text, the <code>inputType</code> attribute's value must be
3005+
combined with the <code>textMultiLine</code> flag for the maxLines attribute to apply. -->
30033006
<attr name="maxLines" format="integer" min="0" />
30043007
<!-- Makes the TextView be at most this many pixels tall. -->
30053008
<attr name="maxHeight" />
@@ -3009,7 +3012,10 @@
30093012
You could get the same effect by specifying this number in the
30103013
layout parameters. -->
30113014
<attr name="height" format="dimension" />
3012-
<!-- Makes the TextView be at least this many lines tall. -->
3015+
<!-- Makes the TextView be at least this many lines tall.
3016+
3017+
When used on an editable text, the <code>inputType</code> attribute's value must be
3018+
combined with the <code>textMultiLine</code> flag for the minLines attribute to apply. -->
30133019
<attr name="minLines" format="integer" min="0" />
30143020
<!-- Makes the TextView be at least this many pixels tall. -->
30153021
<attr name="minHeight" />
@@ -3040,16 +3046,15 @@
30403046
<!-- Constrains the text to a single horizontally scrolling line
30413047
instead of letting it wrap onto multiple lines, and advances
30423048
focus instead of inserting a newline when you press the
3043-
enter key. Note: for editable text views, it is better
3044-
to control this using the textMultiLine flag in the inputType
3045-
attribute. (If both singleLine and inputType are supplied,
3046-
the inputType flags will override the value of singleLine.)
3047-
{@deprecated This attribute is deprecated and is replaced by the textMultiLine flag
3048-
in the inputType attribute. Use caution when altering existing layouts, as the
3049-
default value of singeLine is false (multi-line mode), but if you specify any
3050-
value for inputType, the default is single-line mode. (If both singleLine and
3051-
inputType attributes are found, the inputType flags will override the value of
3052-
singleLine.) } -->
3049+
enter key.
3050+
3051+
The default value is false (multi-line wrapped text mode) for non-editable text, but if
3052+
you specify any value for inputType, the default is true (single-line input field mode).
3053+
3054+
{@deprecated This attribute is deprecated. Use <code>maxLines</code> instead to change
3055+
the layout of a static text, and use the <code>textMultiLine</code> flag in the
3056+
inputType attribute instead for editable text views (if both singleLine and inputType
3057+
are supplied, the inputType flags will override the value of singleLine). } -->
30533058
<attr name="singleLine" format="boolean" />
30543059
<!-- Specifies whether the TextView is enabled or not. {@deprecated Use state_enabled instead}. -->
30553060
<attr name="enabled" format="boolean" />

0 commit comments

Comments
 (0)