summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2014-05-30 23:21:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-30 23:21:33 +0000
commitae706066e1a9aa25c7d57619c0bf8ba24815d3d8 (patch)
treeb2c94f5776c1ccaef77f72ed4ba64ac0a9413f5d /core/java/android
parenta6716aade1d7bf0a60457d80da6aa85bc1006f57 (diff)
parentebba5d4edd763b19124b715a0f084d2f00c84a47 (diff)
downloadframeworks_base-ae706066e1a9aa25c7d57619c0bf8ba24815d3d8.zip
frameworks_base-ae706066e1a9aa25c7d57619c0bf8ba24815d3d8.tar.gz
frameworks_base-ae706066e1a9aa25c7d57619c0bf8ba24815d3d8.tar.bz2
Merge "Fix action bar title TextAppearance usage for Toolbar decor" into lmp-preview-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/widget/Toolbar.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index 5033bee..f35ca27 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -557,6 +557,28 @@ public class Toolbar extends ViewGroup {
}
/**
+ * Sets the text color, size, style, hint color, and highlight color
+ * from the specified TextAppearance resource.
+ */
+ public void setTitleTextAppearance(Context context, int resId) {
+ mTitleTextAppearance = resId;
+ if (mTitleTextView != null) {
+ mTitleTextView.setTextAppearance(context, resId);
+ }
+ }
+
+ /**
+ * Sets the text color, size, style, hint color, and highlight color
+ * from the specified TextAppearance resource.
+ */
+ public void setSubtitleTextAppearance(Context context, int resId) {
+ mSubtitleTextAppearance = resId;
+ if (mSubtitleTextView != null) {
+ mSubtitleTextView.setTextAppearance(context, resId);
+ }
+ }
+
+ /**
* Set the icon to use for the toolbar's navigation button.
*
* <p>The navigation button appears at the start of the toolbar if present. Setting an icon