summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/DatePicker.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-04-04 16:09:08 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2011-04-21 18:33:52 -0700
commitac84d3ba81f08036308b17e1ab919e43987a3df5 (patch)
tree8bf9d7f0b110667e45186d90674465a63e868f26 /core/java/android/widget/DatePicker.java
parent1cc1a41b5a095c2eae556c9be0a7ad3f2fc5bfbb (diff)
downloadframeworks_base-ac84d3ba81f08036308b17e1ab919e43987a3df5.zip
frameworks_base-ac84d3ba81f08036308b17e1ab919e43987a3df5.tar.gz
frameworks_base-ac84d3ba81f08036308b17e1ab919e43987a3df5.tar.bz2
Touch exploration feature, event bubling, refactor
1. Added an Input Filter that interprets the touch screen motion events to perfrom accessibility exploration. One finger explores. Tapping within a given time and distance slop on the last exlopred location does click and long press, respectively. Two fingers close and in the same diretion drag. Multiple finglers or two fingers in different directions or two fingers too far away are delegated to the view hierarchy. Non moving fingers "accidentally grabbed the device for the scrren" are ignored. 2. Added accessibility events for hover enter, hover exit, touch exoloration gesture start, and end. Accessibility hover events are fired by the hover pipeline. An accessibility event is dispatched up the view tree and the topmost view fires it. Thus predecessors can augment the fired event. An accessibility event has several records and a predecessor can optionally modify, delete, and add such to the event. 3. Added onPopulateAccessibilityEvent and refactored the existing accessibility code to use it. 4. Added API for querying the currently enabled accessibility services by feedback type. Change-Id: Iec03c6c3fe298de3f14cb6efdbb9b198cd531a0c
Diffstat (limited to 'core/java/android/widget/DatePicker.java')
-rw-r--r--core/java/android/widget/DatePicker.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java
index 7210e21..30fb927 100644
--- a/core/java/android/widget/DatePicker.java
+++ b/core/java/android/widget/DatePicker.java
@@ -353,13 +353,14 @@ public class DatePicker extends FrameLayout {
}
@Override
- public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
- int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ super.onPopulateAccessibilityEvent(event);
+
+ final int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY
| DateUtils.FORMAT_SHOW_YEAR;
String selectedDateUtterance = DateUtils.formatDateTime(mContext,
mCurrentDate.getTimeInMillis(), flags);
event.getText().add(selectedDateUtterance);
- return true;
}
/**