Loading core/java/android/widget/Toolbar.java +1 −1 Original line number Diff line number Diff line Loading @@ -1593,7 +1593,7 @@ public class Toolbar extends ViewGroup { /** @hide */ public DecorToolbar getWrapper() { if (mWrapper == null) { mWrapper = new ToolbarWidgetWrapper(this); mWrapper = new ToolbarWidgetWrapper(this, true); } return mWrapper; } Loading core/java/com/android/internal/app/ToolbarActionBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ public class ToolbarActionBar extends ActionBar { public ToolbarActionBar(Toolbar toolbar, CharSequence title, Window.Callback windowCallback) { mToolbar = toolbar; mDecorToolbar = new ToolbarWidgetWrapper(toolbar); mDecorToolbar = new ToolbarWidgetWrapper(toolbar, false); mWindowCallback = windowCallback; mDecorToolbar.setWindowCallback(mWindowCallback); toolbar.setOnMenuItemClickListener(mMenuClicker); Loading core/java/com/android/internal/widget/ToolbarWidgetWrapper.java +57 −53 Original line number Diff line number Diff line Loading @@ -81,13 +81,14 @@ public class ToolbarWidgetWrapper implements DecorToolbar { private int mNavigationMode = ActionBar.NAVIGATION_MODE_STANDARD; public ToolbarWidgetWrapper(Toolbar toolbar) { public ToolbarWidgetWrapper(Toolbar toolbar, boolean style) { mToolbar = toolbar; mTitle = toolbar.getTitle(); mSubtitle = toolbar.getSubtitle(); mTitleSet = !TextUtils.isEmpty(mTitle); if (style) { final TypedArray a = toolbar.getContext().obtainStyledAttributes(null, R.styleable.ActionBar, R.attr.actionBarStyle, 0); Loading Loading @@ -118,7 +119,8 @@ public class ToolbarWidgetWrapper implements DecorToolbar { setDisplayOptions(a.getInt(R.styleable.ActionBar_displayOptions, 0)); final int customNavId = a.getResourceId(R.styleable.ActionBar_customNavigationLayout, 0); final int customNavId = a.getResourceId( R.styleable.ActionBar_customNavigationLayout, 0); if (customNavId != 0) { setCustomView(LayoutInflater.from(mToolbar.getContext()).inflate(customNavId, mToolbar, false)); Loading Loading @@ -146,12 +148,14 @@ public class ToolbarWidgetWrapper implements DecorToolbar { mToolbar.setTitleTextAppearance(mToolbar.getContext(), titleTextStyle); } final int subtitleTextStyle = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); final int subtitleTextStyle = a.getResourceId( R.styleable.ActionBar_subtitleTextStyle, 0); if (subtitleTextStyle != 0) { mToolbar.setSubtitleTextAppearance(mToolbar.getContext(), subtitleTextStyle); } a.recycle(); } if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) { mToolbar.setNavigationContentDescription( Loading Loading
core/java/android/widget/Toolbar.java +1 −1 Original line number Diff line number Diff line Loading @@ -1593,7 +1593,7 @@ public class Toolbar extends ViewGroup { /** @hide */ public DecorToolbar getWrapper() { if (mWrapper == null) { mWrapper = new ToolbarWidgetWrapper(this); mWrapper = new ToolbarWidgetWrapper(this, true); } return mWrapper; } Loading
core/java/com/android/internal/app/ToolbarActionBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ public class ToolbarActionBar extends ActionBar { public ToolbarActionBar(Toolbar toolbar, CharSequence title, Window.Callback windowCallback) { mToolbar = toolbar; mDecorToolbar = new ToolbarWidgetWrapper(toolbar); mDecorToolbar = new ToolbarWidgetWrapper(toolbar, false); mWindowCallback = windowCallback; mDecorToolbar.setWindowCallback(mWindowCallback); toolbar.setOnMenuItemClickListener(mMenuClicker); Loading
core/java/com/android/internal/widget/ToolbarWidgetWrapper.java +57 −53 Original line number Diff line number Diff line Loading @@ -81,13 +81,14 @@ public class ToolbarWidgetWrapper implements DecorToolbar { private int mNavigationMode = ActionBar.NAVIGATION_MODE_STANDARD; public ToolbarWidgetWrapper(Toolbar toolbar) { public ToolbarWidgetWrapper(Toolbar toolbar, boolean style) { mToolbar = toolbar; mTitle = toolbar.getTitle(); mSubtitle = toolbar.getSubtitle(); mTitleSet = !TextUtils.isEmpty(mTitle); if (style) { final TypedArray a = toolbar.getContext().obtainStyledAttributes(null, R.styleable.ActionBar, R.attr.actionBarStyle, 0); Loading Loading @@ -118,7 +119,8 @@ public class ToolbarWidgetWrapper implements DecorToolbar { setDisplayOptions(a.getInt(R.styleable.ActionBar_displayOptions, 0)); final int customNavId = a.getResourceId(R.styleable.ActionBar_customNavigationLayout, 0); final int customNavId = a.getResourceId( R.styleable.ActionBar_customNavigationLayout, 0); if (customNavId != 0) { setCustomView(LayoutInflater.from(mToolbar.getContext()).inflate(customNavId, mToolbar, false)); Loading Loading @@ -146,12 +148,14 @@ public class ToolbarWidgetWrapper implements DecorToolbar { mToolbar.setTitleTextAppearance(mToolbar.getContext(), titleTextStyle); } final int subtitleTextStyle = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); final int subtitleTextStyle = a.getResourceId( R.styleable.ActionBar_subtitleTextStyle, 0); if (subtitleTextStyle != 0) { mToolbar.setSubtitleTextAppearance(mToolbar.getContext(), subtitleTextStyle); } a.recycle(); } if (TextUtils.isEmpty(mToolbar.getNavigationContentDescription())) { mToolbar.setNavigationContentDescription( Loading