Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -38177,6 +38177,7 @@ package android.widget { method public android.graphics.drawable.Drawable getLogo(); method public java.lang.CharSequence getLogoDescription(); method public android.view.Menu getMenu(); method public java.lang.CharSequence getNavigationContentDescription(); method public android.graphics.drawable.Drawable getNavigationIcon(); method public java.lang.CharSequence getSubtitle(); method public java.lang.CharSequence getTitle(); core/java/android/widget/Toolbar.java +11 −0 Original line number Diff line number Diff line Loading @@ -634,6 +634,17 @@ public class Toolbar extends ViewGroup { setNavigationIcon(getContext().getDrawable(resId)); } /** * 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 Loading core/java/com/android/internal/widget/ToolbarWidgetWrapper.java +5 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,11 @@ public class ToolbarWidgetWrapper implements DecorToolbar { a.recycle(); if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) { mToolbar.setNavigationContentDescription( getContext().getResources().getText(R.string.action_bar_up_description)); } mToolbar.setNavigationOnClickListener(new View.OnClickListener() { final ActionMenuItem mNavItem = new ActionMenuItem(mToolbar.getContext(), 0, android.R.id.home, 0, 0, mTitle); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -38177,6 +38177,7 @@ package android.widget { method public android.graphics.drawable.Drawable getLogo(); method public java.lang.CharSequence getLogoDescription(); method public android.view.Menu getMenu(); method public java.lang.CharSequence getNavigationContentDescription(); method public android.graphics.drawable.Drawable getNavigationIcon(); method public java.lang.CharSequence getSubtitle(); method public java.lang.CharSequence getTitle();
core/java/android/widget/Toolbar.java +11 −0 Original line number Diff line number Diff line Loading @@ -634,6 +634,17 @@ public class Toolbar extends ViewGroup { setNavigationIcon(getContext().getDrawable(resId)); } /** * 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 Loading
core/java/com/android/internal/widget/ToolbarWidgetWrapper.java +5 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,11 @@ public class ToolbarWidgetWrapper implements DecorToolbar { a.recycle(); if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) { mToolbar.setNavigationContentDescription( getContext().getResources().getText(R.string.action_bar_up_description)); } mToolbar.setNavigationOnClickListener(new View.OnClickListener() { final ActionMenuItem mNavItem = new ActionMenuItem(mToolbar.getContext(), 0, android.R.id.home, 0, 0, mTitle); Loading