Skip to content

Commit e0119c9

Browse files
committed
Remove deprecation on android:enabled attribute.
The android:enabled was never deprecated and replaced by android:state_enabled as it was mentioned in the documentation. The attribute android:enabled when applied to a TextView (or its descendants) still works until now. In fact that's the way to disable widgets from layout XMLs. The deprecation made ADT and lint suggest users not to use this attribute. Change-Id: I5e7d7060d9e79a04342ebc723d7937b9bc12a018 Signed-off-by: Yuku on yuku4 <yukuku@gmail.com>
1 parent 3d7f0cb commit e0119c9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/res/res/values/attrs.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,7 +3021,11 @@
30213021
inputType attributes are found, the inputType flags will override the value of
30223022
singleLine.) } -->
30233023
<attr name="singleLine" format="boolean" />
3024-
<!-- Specifies whether the TextView is enabled or not. {@deprecated Use state_enabled instead}. -->
3024+
<!-- Specifies whether the widget is enabled. The interpretation of the enabled state varies by subclass.
3025+
For example, a non-enabled EditText prevents the user from editing the contained text, and
3026+
a non-enabled Button prevents the user from tapping the button.
3027+
The appearance of enabled and non-enabled widgets may differ, if the drawables referenced
3028+
from evaluating state_enabled differ. -->
30253029
<attr name="enabled" format="boolean" />
30263030
<!-- If the text is selectable, select it all when the view takes
30273031
focus instead of moving the cursor to the start or end. -->
@@ -3052,7 +3056,7 @@
30523056
<!-- Input is numeric. -->
30533057
<flag name="integer" value="0x01" />
30543058
<!-- Input is numeric, with sign allowed. -->
3055-
<flag name="signed" value="0x003" />
3059+
<flag name="signed" value="0x03" />
30563060
<!-- Input is numeric, with decimals allowed. -->
30573061
<flag name="decimal" value="0x05" />
30583062
</attr>

0 commit comments

Comments
 (0)