Loading core/java/android/view/View.java +9 −0 Original line number Diff line number Diff line Loading @@ -8562,6 +8562,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * announcements every time a View is updated. * * <p> * For notifying users about errors, such as in a login screen with text that displays an * "incorrect password" notification, that view should send an AccessibilityEvent of type * {@link AccessibilityEvent#CONTENT_CHANGE_TYPE_ERROR} and set * {@link AccessibilityNodeInfo#setError(CharSequence)} instead. Custom widgets should expose * error-setting methods that support accessibility automatically. For example, instead of * explicitly sending this event when using a TextView, use * {@link android.widget.TextView#setError(CharSequence)}. * * <p> * Use {@link #setStateDescription(CharSequence)} to convey state changes to views within the * user interface. While a live region may send different types of events generated by the view, * state description will send {@link AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED} events of Loading
core/java/android/view/View.java +9 −0 Original line number Diff line number Diff line Loading @@ -8562,6 +8562,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * announcements every time a View is updated. * * <p> * For notifying users about errors, such as in a login screen with text that displays an * "incorrect password" notification, that view should send an AccessibilityEvent of type * {@link AccessibilityEvent#CONTENT_CHANGE_TYPE_ERROR} and set * {@link AccessibilityNodeInfo#setError(CharSequence)} instead. Custom widgets should expose * error-setting methods that support accessibility automatically. For example, instead of * explicitly sending this event when using a TextView, use * {@link android.widget.TextView#setError(CharSequence)}. * * <p> * Use {@link #setStateDescription(CharSequence)} to convey state changes to views within the * user interface. While a live region may send different types of events generated by the view, * state description will send {@link AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED} events of