OSDN Git Service

Adding accessibility delegate mechanism for backwards compatibility support.
authorSvetoslav Ganov <svetoslavganov@google.com>
Fri, 9 Sep 2011 23:41:13 +0000 (16:41 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Mon, 12 Sep 2011 22:42:19 +0000 (15:42 -0700)
commit031d9c1389de2b9dac7f175af0b962e24b21d5be
treef235b3cf3aea41c202c95f81a02de84962aca321
parent5e8752595f7a3d3dd1e0d469ac275295e38bcfe1
Adding accessibility delegate mechanism for backwards compatibility support.

1. Added an AccessibilityDelegate class in View which can be set by
   a client that wants to cutomize accessibility behavior via
   composition as opposed to inheritance. Insead overriding a new method in
   View thus being bound to the API version that introduced this
   method a developer can conditionally inject the accessibility
   customization if the platform API version is heigh enough. The
   developer will have to override the method of interest of the
   delegate. The default implementation of the delegate methods is
   the same as that of View in the case that there is no delegate
   set. If a delegate is set calling an accessibility related method
   on View will be handed off to the corresponsing method of the
   delegate.

bug:5259555

Change-Id: I00e750e22e5e7164a1b571cb3d12ecaf4ab93db4
api/current.txt
core/java/android/view/View.java
core/java/android/view/ViewGroup.java
core/java/android/widget/AdapterView.java
core/java/android/widget/ImageView.java
core/java/android/widget/TabWidget.java