am 498c84e7: Merge "Don\'t wipe out explicit Toolbar nav icon when calling setSupportActionBar" into lmp-mr1-dev
* commit '498c84e7366cc0b4355f034bd03534a14beaf166': Don't wipe out explicit Toolbar nav icon when calling setSupportActionBar
This commit is contained in:
@@ -97,6 +97,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
|
||||
mTitle = toolbar.getTitle();
|
||||
mSubtitle = toolbar.getSubtitle();
|
||||
mTitleSet = mTitle != null;
|
||||
mNavIcon = mToolbar.getNavigationIcon();
|
||||
final TypedArray a = toolbar.getContext().obtainStyledAttributes(null,
|
||||
R.styleable.ActionBar, R.attr.actionBarStyle, 0);
|
||||
mDefaultNavigationIcon = a.getDrawable(R.styleable.ActionBar_homeAsUpIndicator);
|
||||
@@ -120,7 +121,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
|
||||
if (icon != null) {
|
||||
setIcon(icon);
|
||||
}
|
||||
if (mDefaultNavigationIcon != null) {
|
||||
if (mNavIcon == null && mDefaultNavigationIcon != null) {
|
||||
setNavigationIcon(mDefaultNavigationIcon);
|
||||
}
|
||||
setDisplayOptions(a.getInt(R.styleable.ActionBar_displayOptions, 0));
|
||||
|
||||
Reference in New Issue
Block a user