[Android] Changes for ToolbarPhone tab switcher animation
Chromium change: https://github.com/chromium/chromium/commit/81300279c801ec659aa9e9417b0a930db4a06974 [Toolbar] Refactor ToolbarPhone's tab switcher logic There are three notable changes here: 1. ToolbarPhone is no longer hidden when entering the tab switcher; it's only hidden once the transition to the tab switcher finishes. 2. The tab switcher isn't treated as "in overview and showing omniox" because a) the omnibox isn't shown in this mode and b) this causes visual inconsistencies - e.g. hidden buttons, "search or type web address" as the url bar text instead of the url. 3. We suppress captures when entering or in tab switcher mode, since we no longer need the capture in this mode. (cherry picked from commit b6991fa) Bug: 1360307
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
package org.chromium.chrome.browser.toolbar.top;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewStub;
|
||||
|
||||
import org.chromium.base.Callback;
|
||||
@@ -128,4 +129,16 @@ public class BraveTopToolbarCoordinator extends TopToolbarCoordinator {
|
||||
public ObservableSupplier<Integer> getConstraintsProxy() {
|
||||
return mConstraintsProxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTabSwitcherMode(
|
||||
boolean inTabSwitcherMode, boolean showToolbar, boolean delayAnimation) {
|
||||
super.setTabSwitcherMode(inTabSwitcherMode, showToolbar, delayAnimation);
|
||||
|
||||
if (mBraveToolbarLayout instanceof ToolbarPhone) {
|
||||
mBraveToolbarLayout.setVisibility(
|
||||
((ToolbarPhone) mBraveToolbarLayout).isInTabSwitcherMode() ? View.INVISIBLE
|
||||
: View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user