Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -37642,8 +37642,10 @@ package android.widget { method public void setOnMenuItemClickListener(android.widget.Toolbar.OnMenuItemClickListener); method public void setSubtitle(int); method public void setSubtitle(java.lang.CharSequence); method public void setSubtitleTextAppearance(android.content.Context, int); method public void setTitle(int); method public void setTitle(java.lang.CharSequence); method public void setTitleTextAppearance(android.content.Context, int); method public boolean showOverflowMenu(); } core/java/android/widget/Toolbar.java +22 −0 Original line number Diff line number Diff line Loading @@ -556,6 +556,28 @@ public class Toolbar extends ViewGroup { mSubtitleText = subtitle; } /** * 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. * Loading core/java/com/android/internal/widget/ToolbarWidgetWrapper.java +10 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,16 @@ public class ToolbarWidgetWrapper implements DecorToolbar { mToolbar.setContentInsetsRelative(contentInsetStart, contentInsetEnd); } final int titleTextStyle = a.getResourceId(R.styleable.ActionBar_titleTextStyle, 0); if (titleTextStyle != 0) { mToolbar.setTitleTextAppearance(mToolbar.getContext(), titleTextStyle); } final int subtitleTextStyle = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); if (subtitleTextStyle != 0) { mToolbar.setSubtitleTextAppearance(mToolbar.getContext(), subtitleTextStyle); } a.recycle(); mToolbar.setNavigationOnClickListener(new View.OnClickListener() { Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -37642,8 +37642,10 @@ package android.widget { method public void setOnMenuItemClickListener(android.widget.Toolbar.OnMenuItemClickListener); method public void setSubtitle(int); method public void setSubtitle(java.lang.CharSequence); method public void setSubtitleTextAppearance(android.content.Context, int); method public void setTitle(int); method public void setTitle(java.lang.CharSequence); method public void setTitleTextAppearance(android.content.Context, int); method public boolean showOverflowMenu(); }
core/java/android/widget/Toolbar.java +22 −0 Original line number Diff line number Diff line Loading @@ -556,6 +556,28 @@ public class Toolbar extends ViewGroup { mSubtitleText = subtitle; } /** * 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. * Loading
core/java/com/android/internal/widget/ToolbarWidgetWrapper.java +10 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,16 @@ public class ToolbarWidgetWrapper implements DecorToolbar { mToolbar.setContentInsetsRelative(contentInsetStart, contentInsetEnd); } final int titleTextStyle = a.getResourceId(R.styleable.ActionBar_titleTextStyle, 0); if (titleTextStyle != 0) { mToolbar.setTitleTextAppearance(mToolbar.getContext(), titleTextStyle); } final int subtitleTextStyle = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); if (subtitleTextStyle != 0) { mToolbar.setSubtitleTextAppearance(mToolbar.getContext(), subtitleTextStyle); } a.recycle(); mToolbar.setNavigationOnClickListener(new View.OnClickListener() { Loading