From d760249623a57d35dc0b4e57972eb9a72934d500 Mon Sep 17 00:00:00 2001
From: Adam Powell
Date: Thu, 28 Aug 2014 19:35:36 -0700
Subject: Doc improvements for new Toolbar changes, now with attributes.
Change-Id: I3f67899b4f9ab9ae4ab4f5dcbc853c08d7867947
---
core/java/android/widget/Toolbar.java | 12 ++++++++++++
core/res/res/values/attrs.xml | 6 +++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index f211b32b0f1f..ece8aa45398c 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -679,6 +679,8 @@ public class Toolbar extends ViewGroup {
* as screen readers or tooltips.
*
* @return The navigation button's content description
+ *
+ * @attr ref android.R.styleable#Toolbar_navigationContentDescription
*/
@Nullable
public CharSequence getNavigationContentDescription() {
@@ -692,6 +694,8 @@ public class Toolbar extends ViewGroup {
*
* @param resId Resource ID of a content description string to set, or 0 to
* clear the description
+ *
+ * @attr ref android.R.styleable#Toolbar_navigationContentDescription
*/
public void setNavigationContentDescription(int resId) {
setNavigationContentDescription(resId != 0 ? getContext().getText(resId) : null);
@@ -704,6 +708,8 @@ public class Toolbar extends ViewGroup {
*
* @param description Content description to set, or null to
* clear the content description
+ *
+ * @attr ref android.R.styleable#Toolbar_navigationContentDescription
*/
public void setNavigationContentDescription(@Nullable CharSequence description) {
if (!TextUtils.isEmpty(description)) {
@@ -725,6 +731,8 @@ public class Toolbar extends ViewGroup {
* tooltips.
*
* @param resId Resource ID of a drawable to set
+ *
+ * @attr ref android.R.styleable#Toolbar_navigationIcon
*/
public void setNavigationIcon(int resId) {
setNavigationIcon(getContext().getDrawable(resId));
@@ -741,6 +749,8 @@ public class Toolbar extends ViewGroup {
* tooltips.
*
* @param icon Drawable to set, may be null to clear the icon
+ *
+ * @attr ref android.R.styleable#Toolbar_navigationIcon
*/
public void setNavigationIcon(@Nullable Drawable icon) {
if (icon != null) {
@@ -761,6 +771,8 @@ public class Toolbar extends ViewGroup {
* Return the current drawable used as the navigation icon.
*
* @return The navigation icon drawable
+ *
+ * @attr ref android.R.styleable#Toolbar_navigationIcon
*/
@Nullable
public Drawable getNavigationIcon() {
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index cf1794bac2a7..536bc5d7e44e 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -7322,8 +7322,12 @@
+
-
+
+
--
cgit v1.2.3-59-g8ed1b