summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/ViewParent.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-05-08 15:58:32 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2012-05-14 16:21:29 -0700
commite5dfa47d84668376b84074c04570fb961870adeb (patch)
tree3be9fe55e6170d33bbfb7fe57af3a1cc05c05266 /core/java/android/view/ViewParent.java
parent0d607fbe546ac943de38dad33ae681b09efec6ea (diff)
downloadframeworks_base-e5dfa47d84668376b84074c04570fb961870adeb.zip
frameworks_base-e5dfa47d84668376b84074c04570fb961870adeb.tar.gz
frameworks_base-e5dfa47d84668376b84074c04570fb961870adeb.tar.bz2
Improving accessibility focus traversal.
1. Now the views considered during the accessibility focus search are the ones that would get accessibility focus when thovered over. This way the user will get the same items i.e. feedback if he touch explores the screen and uses focus traversal. This is imperative for a good user experience. 2. Updated which focusables are considered when searching for access focus in ViewGroup. Generally accessibility focus ignores focus before/after descendants. 3. Implemented focus search strategy in AbsListView that will traverse the items of the current list (and the stuff withing one item before moving to the next) before continuing the search if forward and backward accessibility focus direction. 4. View focus search stops at root namespace. This is not the right way to prevent some stuff that is not supposed to get a focus in a container for a specific state. Actually the addFocusables for that container has to be overriden. Further this approach leads to focus getting stuck. The accessibility focus ignores root names space since we want to traverse the entire screen. 5. Fixed an bug in AccessibilityInteractionController which was not starting to search from the root of a virtual node tree. 6. Fixed a couple of bugs in FocusFinder where it was possible to get index out of bounds exception if the focusables list is empty. bug:5932640 Change-Id: Ic3bdd11767a7d40fbb21f35dcd79a4746af784d4
Diffstat (limited to 'core/java/android/view/ViewParent.java')
-rw-r--r--core/java/android/view/ViewParent.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/view/ViewParent.java b/core/java/android/view/ViewParent.java
index ddff91d..d93b996 100644
--- a/core/java/android/view/ViewParent.java
+++ b/core/java/android/view/ViewParent.java
@@ -295,4 +295,16 @@ public interface ViewParent {
* @hide
*/
public void childAccessibilityStateChanged(View child);
+
+ /**
+ * A descendant requests this view to find a candidate to take accessibility
+ * focus from hover.
+ *
+ * @param child The child making the call.
+ * @param descendant The descendant that made the initial request.
+ * @return A view to take accessibility focus.
+ *
+ * @hide
+ */
+ public View findViewToTakeAccessibilityFocusFromHover(View child, View descendant);
}