Skip to content

Commit

Permalink
Keep fullscreen in hamburger menu when exiting fullscreen video
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu committed Feb 7, 2025
1 parent 9f55776 commit c9235df
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,16 @@ android {
lint {
disable 'ExtraTranslation'
}
androidResources {

aaptOptions {
noCompress 'ja'
noCompress 'dat'
noCompress 'bin'
noCompress 'pak'
noCompress 'ja'
noCompress 'dat'
noCompress 'bin'
}

}

configurations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@ private void updateUI() {
if (mAttachedWindow != null) {
mAttachedWindow.setIsFullScreen(false);
}
if (mAttachedWindow.getKeepFullscreenInHamburgerMenu()) {
postDelayed(() -> {
mAttachedWindow.setIsFullScreen(true);
}, 2000);
mAttachedWindow.setKeepFullscreenInHamburgerMenu(false);
}
if (mAudio != null) {
mAudio.playSound(AudioEngine.Sound.CLICK);
}
Expand Down Expand Up @@ -1350,6 +1356,7 @@ public void onResize() {
@Override
public void onFullScreen() {
mAttachedWindow.setIsFullScreen(true);
mAttachedWindow.setKeepFullscreenInHamburgerMenu(true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public class WindowWidget extends UIWidget implements SessionChangeListener,
private SharedPreferences mPrefs;
private DownloadsManager mDownloadsManager;
private float mBrowserDensity;
private boolean keepFullscreenInHamburgerMenu;

public interface WindowListener {
default void onFocusRequest(@NonNull WindowWidget aWindow) {}
Expand Down Expand Up @@ -2337,4 +2338,12 @@ private float getBrowserDensity() {
}
return mBrowserDensity;
}

public boolean getKeepFullscreenInHamburgerMenu() {
return keepFullscreenInHamburgerMenu;
}

public void setKeepFullscreenInHamburgerMenu(boolean keepFullscreenInHamburgerMenu) {
this.keepFullscreenInHamburgerMenu = keepFullscreenInHamburgerMenu;
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jul 21 16:13:31 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ versions.atsl_runner = "1.5.2"
versions.atsl_rules = "1.5.0"
versions.atsl_junit = "1.1.5"
versions.espresso = "3.5.1"
versions.android_gradle_plugin = '8.7.2'
versions.android_gradle_plugin = "8.2.1"
versions.kotlin = "1.9.21"
versions.kotlin_coroutines = "1.7.3"
versions.snakeyaml = "2.0"
Expand Down

0 comments on commit c9235df

Please sign in to comment.