Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Proxify Hamburger Menu. Fixes #2833 (#2838)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Feb 25, 2020
1 parent eebab02 commit 85351a7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import org.mozilla.geckoview.GeckoSessionSettings;
import org.mozilla.vrbrowser.R;
import org.mozilla.vrbrowser.browser.SettingsStore;
import org.mozilla.vrbrowser.ui.widgets.WidgetPlacement;
import org.mozilla.vrbrowser.utils.AnimationHelper;

Expand All @@ -17,6 +18,8 @@

public class HamburgerMenuWidget extends MenuWidget {

private boolean mProxify = SettingsStore.getInstance(getContext()).getLayersEnabled();

public interface MenuDelegate {
void onSendTab();
void onResize();
Expand Down Expand Up @@ -65,6 +68,7 @@ public void onConfigurationChanged(Configuration newConfig) {

@Override
public void show(int aShowFlags) {
mWidgetPlacement.proxifyLayer = mProxify;
super.show(aShowFlags);

AnimationHelper.scaleIn(findViewById(R.id.menuContainer), 100, 0, null);
Expand All @@ -73,6 +77,7 @@ public void show(int aShowFlags) {
@Override
public void hide(int aHideFlags) {
AnimationHelper.scaleOut(findViewById(R.id.menuContainer), 100, 0, () -> HamburgerMenuWidget.super.hide(aHideFlags));
mWidgetPlacement.proxifyLayer = false;
}

@Override
Expand Down

0 comments on commit 85351a7

Please sign in to comment.