diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-06-26 17:55:44 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-06-26 21:35:22 -0700 |
| commit | a0156177cdc809795dd8bc5a19943dd2b6f82b66 (patch) | |
| tree | d7d3404c94b3f4af1fb9e71595f2443aa2ab8925 /core/java/android/view/ViewConfiguration.java | |
| parent | c18e7e73158f794064fed5017c6c1c9a288673bd (diff) | |
Added scroll and text selection change accessibility events.
1. Added scrolling accessibility event to provicde feedback
when a view is scrolled.
Note: We need scroll events for ICS since even though we have
touch exploration the user does not know when something
is scrollable and not feedback is provided while scrolling.
bug:4902097
2. Added a text selection change event to provide feedback
for selection changes including cursor movement.
Note: We need the text selection change events for ICS since
even though the IME supports navigation in text fields
the user receives no feedback for the current selection/
cursor position.
bug:4586186
3. Added a scrollable property to both AccessibilityEvent and
AccessibilityNodeInfo. The info has to describe the source
in terms of all properties that make sense for accessibility
purposes and the event has this property (kinda duplicated)
since clients will aways want to know if the source is
scrollable to provided clue to the user and we want to avoid
pulling the info of the source for every accessibility event.
Change-Id: I232d6825da78e6a12d52125f51320217e6fadb11
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
| -rw-r--r-- | core/java/android/view/ViewConfiguration.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 5919150dbfae..f3a5050001ea 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -176,6 +176,14 @@ public class ViewConfiguration { private static final int TOUCH_EXPLORATION_TAP_SLOP = 80; /** + * Delay before dispatching a recurring accessibility event in milliseconds. + * This delay guarantees that a recurring event will be send at most once + * during the {@link #SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS} time + * frame. + */ + private static final long SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS = 400; + + /** * The maximum size of View's drawing cache, expressed in bytes. This size * should be at least equal to the size of the screen in ARGB888 format. */ @@ -498,6 +506,19 @@ public class ViewConfiguration { } /** + * Interval for dispatching a recurring accessibility event in milliseconds. + * This interval guarantees that a recurring event will be send at most once + * during the {@link #getSendRecurringAccessibilityEventsInterval()} time frame. + * + * @return The delay in milliseconds. + * + * @hide + */ + public static long getSendRecurringAccessibilityEventsInterval() { + return SEND_RECURRING_ACCESSIBILITY_EVENTS_INTERVAL_MILLIS; + } + + /** * @return Distance a touch must be outside the bounds of a window for it * to be counted as outside the window for purposes of dismissing that * window. |
