diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-29 10:44:59 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-29 10:45:05 -0700 |
| commit | 7650259a597dd24137420d32acc35efc44db381e (patch) | |
| tree | ab184cb159301040987fea4abbc63fc0dae313e9 /core/java/android/widget/TextView.java | |
| parent | a31f5e63743f3fc788acbd85474ec80eaf5c8b4d (diff) | |
| download | frameworks_base-7650259a597dd24137420d32acc35efc44db381e.zip frameworks_base-7650259a597dd24137420d32acc35efc44db381e.tar.gz frameworks_base-7650259a597dd24137420d32acc35efc44db381e.tar.bz2 | |
Improving accessibility feedback for two state widgets.
1. Added population of sensible text for the state of the
two state controls such as CheckBox, Switch, etc. This
is important since if they are in a layout manager which
fires an accessibility event there should be a description
of the widget.
bug:5092552
Change-Id: Ie3ca955653563496b84db379ae23a23fe88089a8
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 127b6a3..dd5f065 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -8425,6 +8425,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (TextUtils.isEmpty(text)) { text = getHint(); } + if (TextUtils.isEmpty(text)) { + text = getContentDescription(); + } if (!TextUtils.isEmpty(text)) { event.getText().add(text); } |
