Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d4b9fd7 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Document API-level-specific delegate behavior"

parents 2e76dca2 c687c194
Loading
Loading
Loading
Loading
+29 −5
Original line number Original line Diff line number Diff line
@@ -6649,12 +6649,24 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    }
    /**
    /**
     * Sets a delegate for implementing accessibility support via composition as
     * Sets a delegate for implementing accessibility support via composition
     * opposed to inheritance. The delegate's primary use is for implementing
     * (as opposed to inheritance). For more details, see
     * backwards compatible widgets. For more details see {@link AccessibilityDelegate}.
     * {@link AccessibilityDelegate}.
     *
     * <p>
     * @param delegate The delegate instance.
     * <strong>Note:</strong> On platform versions prior to
     * {@link android.os.Build.VERSION_CODES#M API 23}, delegate methods on
     * views in the {@code android.widget.*} package are called <i>before</i>
     * host methods. This prevents certain properties such as class name from
     * being modified by overriding
     * {@link AccessibilityDelegate#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfo)},
     * as any changes will be overwritten by the host class.
     * <p>
     * Starting in {@link android.os.Build.VERSION_CODES#M API 23}, delegate
     * methods are called <i>after</i> host methods, which all properties to be
     * modified without being overwritten by the host class.
     *
     *
     * @param delegate the object to which accessibility method calls should be
     *                 delegated
     * @see AccessibilityDelegate
     * @see AccessibilityDelegate
     */
     */
    public void setAccessibilityDelegate(@Nullable AccessibilityDelegate delegate) {
    public void setAccessibilityDelegate(@Nullable AccessibilityDelegate delegate) {
@@ -22277,6 +22289,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * corresponding delegate method without altering the behavior of the rest
     * corresponding delegate method without altering the behavior of the rest
     * accessibility related methods of the host view.
     * accessibility related methods of the host view.
     * </p>
     * </p>
     * <p>
     * <strong>Note:</strong> On platform versions prior to
     * {@link android.os.Build.VERSION_CODES#M API 23}, delegate methods on
     * views in the {@code android.widget.*} package are called <i>before</i>
     * host methods. This prevents certain properties such as class name from
     * being modified by overriding
     * {@link AccessibilityDelegate#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfo)},
     * as any changes will be overwritten by the host class.
     * <p>
     * Starting in {@link android.os.Build.VERSION_CODES#M API 23}, delegate
     * methods are called <i>after</i> host methods, which all properties to be
     * modified without being overwritten by the host class.
     */
     */
    public static class AccessibilityDelegate {
    public static class AccessibilityDelegate {