diff options
author | Adam Powell <adamp@google.com> | 2014-06-24 17:18:52 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2014-06-24 17:32:06 -0700 |
commit | 7901b2a54981b769bf27852c41ce612871a8e019 (patch) | |
tree | b869b62e88d0e7dde1dbb79f1e7ba13c38da4281 /core/java/android/widget/Toolbar.java | |
parent | 4212d1f2e9f662626a89491c883e94c4d3c68d04 (diff) | |
download | frameworks_base-7901b2a54981b769bf27852c41ce612871a8e019.zip frameworks_base-7901b2a54981b769bf27852c41ce612871a8e019.tar.gz frameworks_base-7901b2a54981b769bf27852c41ce612871a8e019.tar.bz2 |
Set the default content description for Toolbars acting as action bars
Bug 15814044
Change-Id: I07c20de1349cb07f21eaf0db718da94c0ba7043d
Diffstat (limited to 'core/java/android/widget/Toolbar.java')
-rw-r--r-- | core/java/android/widget/Toolbar.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java index 00e0d17..122df2c 100644 --- a/core/java/android/widget/Toolbar.java +++ b/core/java/android/widget/Toolbar.java @@ -635,6 +635,17 @@ public class Toolbar extends ViewGroup { } /** + * Retrieve the currently configured content description for the navigation button view. + * This will be used to describe the navigation action to users through mechanisms such + * as screen readers or tooltips. + * + * @return The navigation button's content description + */ + public CharSequence getNavigationContentDescription() { + return mNavButtonView != null ? mNavButtonView.getContentDescription() : null; + } + + /** * Set a content description for the navigation button if one is present. The content * description will be read via screen readers or other accessibility systems to explain * the action of the navigation button. |