|
@@ -61,7 +61,7 @@ public class TitleBar extends Toolbar {
|
61
|
61
|
if (shouldSetLeftButton(leftButtonParams)) {
|
62
|
62
|
createAndSetLeftButton(leftButtonParams, leftButtonOnClickListener, navigatorEventId, overrideBackPressInJs);
|
63
|
63
|
} else if (hasLeftButton()) {
|
64
|
|
- if (leftButtonParams.hasDefaultIcon()) {
|
|
64
|
+ if (leftButtonParams.hasDefaultIcon() || leftButtonParams.hasCustomIcon()) {
|
65
|
65
|
updateLeftButton(leftButtonParams);
|
66
|
66
|
} else {
|
67
|
67
|
removeLeftButton();
|
|
@@ -160,7 +160,13 @@ public class TitleBar extends Toolbar {
|
160
|
160
|
}
|
161
|
161
|
|
162
|
162
|
private void updateLeftButton(TitleBarLeftButtonParams leftButtonParams) {
|
163
|
|
- leftButton.setIconState(leftButtonParams);
|
|
163
|
+ if (leftButtonParams.hasDefaultIcon()) {
|
|
164
|
+ leftButton.setIconState(leftButtonParams);
|
|
165
|
+ setNavigationIcon(leftButton);
|
|
166
|
+ } else if (leftButtonParams.hasCustomIcon()) {
|
|
167
|
+ leftButton.setCustomIcon(leftButtonParams);
|
|
168
|
+ setNavigationIcon(leftButtonParams.icon);
|
|
169
|
+ }
|
164
|
170
|
}
|
165
|
171
|
|
166
|
172
|
private boolean shouldSetLeftButton(TitleBarLeftButtonParams leftButtonParams) {
|
|
@@ -175,7 +181,7 @@ public class TitleBar extends Toolbar {
|
175
|
181
|
overrideBackPressInJs);
|
176
|
182
|
setNavigationOnClickListener(leftButton);
|
177
|
183
|
|
178
|
|
- if (leftButtonParams.icon != null) {
|
|
184
|
+ if (leftButtonParams.hasCustomIcon()) {
|
179
|
185
|
setNavigationIcon(leftButtonParams.icon);
|
180
|
186
|
} else {
|
181
|
187
|
setNavigationIcon(leftButton);
|