更新版本号

This commit is contained in:
lyswhut 2023-03-22 17:27:55 +08:00
parent 5c2c4a3774
commit 274eabdea6
4 changed files with 30 additions and 36 deletions

View File

@ -279,33 +279,33 @@ public class UtilsModule extends ReactContextBaseJavaModule {
}
// https://github.com/Anthonyzou/react-native-full-screen/blob/master/android/src/main/java/com/rn/full/screen/FullScreen.java
@ReactMethod
public void onFullScreen() {
UiThreadUtil.runOnUiThread(() -> {
Activity currentActivity = reactContext.getCurrentActivity();
if (currentActivity == null) return;
currentActivity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE
);
});
}
@ReactMethod
public void offFullScreen() {
UiThreadUtil.runOnUiThread(() -> {
Activity currentActivity = reactContext.getCurrentActivity();
if (currentActivity == null) return;
currentActivity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
);
});
}
// @ReactMethod
// public void onFullScreen() {
// UiThreadUtil.runOnUiThread(() -> {
// Activity currentActivity = reactContext.getCurrentActivity();
// if (currentActivity == null) return;
// currentActivity.getWindow().getDecorView().setSystemUiVisibility(
// View.SYSTEM_UI_FLAG_LAYOUT_STABLE
// | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
// | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
// | View.SYSTEM_UI_FLAG_IMMERSIVE
// );
// });
// }
// @ReactMethod
// public void offFullScreen() {
// UiThreadUtil.runOnUiThread(() -> {
// Activity currentActivity = reactContext.getCurrentActivity();
// if (currentActivity == null) return;
// currentActivity.getWindow().getDecorView().setSystemUiVisibility(
// View.SYSTEM_UI_FLAG_LAYOUT_STABLE
// | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// );
// });
// }
}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "lx-music-mobile",
"version": "1.0.0-beta.11",
"version": "1.0.0-beta.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "lx-music-mobile",
"version": "1.0.0-beta.11",
"version": "1.0.0-beta.12",
"license": "Apache-2.0",
"dependencies": {
"@craftzdog/react-native-buffer": "^6.0.5",

View File

@ -1,6 +1,6 @@
{
"name": "lx-music-mobile",
"version": "1.0.0-beta.11",
"version": "1.0.0-beta.12",
"versionCode": 53,
"private": true,
"scripts": {

View File

@ -44,9 +44,3 @@ export const readFile = async(filePath: string): Promise<string> => {
export const getSystemLocales = async(): Promise<string> => {
return UtilsModule.getSystemLocales()
}
export const onFullScreen = async() => {
UtilsModule.onFullScreen()
}
export const offFullScreen = async() => {
UtilsModule.offFullScreen()
}