Commit 561d3a94 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Make browsing mode bottom toolbar have initial visibility of true

The model's visibility property starts off as false even though the
browsing mode bottom toolbar is visible initially. Also looks like we
had a bug in the view binder where visibility did the opposite of
what we wanted it to. Not sure how anything worked without this fix...

Bug: 905551
Change-Id: I6737aa480563f5c19d3938486b575dbd5841a184
Reviewed-on: https://chromium-review.googlesource.com/c/1341143Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609533}
parent 0e229191
...@@ -53,5 +53,6 @@ public class BrowsingModeBottomToolbarModel extends PropertyModel { ...@@ -53,5 +53,6 @@ public class BrowsingModeBottomToolbarModel extends PropertyModel {
super(Y_OFFSET, ANDROID_VIEW_VISIBLE, COMPOSITED_VIEW_VISIBLE, LAYOUT_MANAGER, super(Y_OFFSET, ANDROID_VIEW_VISIBLE, COMPOSITED_VIEW_VISIBLE, LAYOUT_MANAGER,
TOOLBAR_SWIPE_LAYOUT, RESOURCE_MANAGER, TOOLBAR_SWIPE_HANDLER, IS_VISIBLE, TOOLBAR_SWIPE_LAYOUT, RESOURCE_MANAGER, TOOLBAR_SWIPE_HANDLER, IS_VISIBLE,
PRIMARY_COLOR); PRIMARY_COLOR);
set(IS_VISIBLE, true);
} }
} }
...@@ -84,7 +84,7 @@ public class BrowsingModeBottomToolbarViewBinder ...@@ -84,7 +84,7 @@ public class BrowsingModeBottomToolbarViewBinder
.setBackgroundColor(model.get(BrowsingModeBottomToolbarModel.PRIMARY_COLOR)); .setBackgroundColor(model.get(BrowsingModeBottomToolbarModel.PRIMARY_COLOR));
} else if (BrowsingModeBottomToolbarModel.IS_VISIBLE == propertyKey) { } else if (BrowsingModeBottomToolbarModel.IS_VISIBLE == propertyKey) {
final boolean isVisible = model.get(BrowsingModeBottomToolbarModel.IS_VISIBLE); final boolean isVisible = model.get(BrowsingModeBottomToolbarModel.IS_VISIBLE);
view.toolbarRoot.setVisibility(isVisible ? View.GONE : View.VISIBLE); view.toolbarRoot.setVisibility(isVisible ? View.VISIBLE : View.GONE);
} else { } else {
assert false : "Unhandled property detected in BrowsingModeBottomToolbarViewBinder!"; assert false : "Unhandled property detected in BrowsingModeBottomToolbarViewBinder!";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment