Merge pull request #23271 from brave/android_tab_swipe_animation_fix
[Android] Fix for tab swipe animation
This commit is contained in:
@@ -860,3 +860,12 @@
|
||||
*** getApplicationLocale(...);
|
||||
*** setApplicationLocale(...);
|
||||
}
|
||||
|
||||
-keep class org.chromium.chrome.browser.compositor.layouts.ToolbarSwipeLayout {
|
||||
public <init>(...);
|
||||
*** mMoveToolbar;
|
||||
}
|
||||
|
||||
-keep class org.chromium.chrome.browser.compositor.layouts.BraveToolbarSwipeLayout {
|
||||
public <init>(...);
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/* Copyright (c) 2024 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.compositor.layouts;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
|
||||
import org.chromium.chrome.browser.layouts.LayoutManager;
|
||||
import org.chromium.chrome.browser.theme.TopUiThemeColorProvider;
|
||||
|
||||
/** Layout defining the animation and positioning of the tabs during the edge swipe effect. */
|
||||
public class BraveToolbarSwipeLayout extends ToolbarSwipeLayout {
|
||||
/**
|
||||
* Whether or not to move toolbar with tab contents. Will be deleted in bytecode, value from the
|
||||
* parent class will be used instead.
|
||||
*/
|
||||
private boolean mMoveToolbar;
|
||||
|
||||
public BraveToolbarSwipeLayout(
|
||||
Context context,
|
||||
LayoutUpdateHost updateHost,
|
||||
LayoutRenderHost renderHost,
|
||||
BrowserControlsStateProvider browserControlsStateProvider,
|
||||
LayoutManager layoutManager,
|
||||
TopUiThemeColorProvider topUiColorProvider) {
|
||||
super(
|
||||
context,
|
||||
updateHost,
|
||||
renderHost,
|
||||
browserControlsStateProvider,
|
||||
layoutManager,
|
||||
topUiColorProvider);
|
||||
|
||||
// To postpone toolbar transition animation to the end of the swipe.
|
||||
mMoveToolbar = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user