mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-21 08:41:57 +00:00
bottomnav behaviour fix
This commit is contained in:
parent
9452b01e9c
commit
09e25738a8
2 changed files with 11 additions and 2 deletions
1
app.json
1
app.json
|
|
@ -16,6 +16,7 @@
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true,
|
"supportsTablet": true,
|
||||||
|
"requireFullScreen": true,
|
||||||
"icon": "./assets/ios/AppIcon.appiconset/Icon-App-60x60@3x.png",
|
"icon": "./assets/ios/AppIcon.appiconset/Icon-App-60x60@3x.png",
|
||||||
"buildNumber": "22",
|
"buildNumber": "22",
|
||||||
"infoPlist": {
|
"infoPlist": {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { NavigationContainer, DefaultTheme as NavigationDefaultTheme, DarkTheme
|
||||||
import { createNativeStackNavigator, NativeStackNavigationOptions, NativeStackNavigationProp } from '@react-navigation/native-stack';
|
import { createNativeStackNavigator, NativeStackNavigationOptions, NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||||
import { createBottomTabNavigator, BottomTabNavigationProp } from '@react-navigation/bottom-tabs';
|
import { createBottomTabNavigator, BottomTabNavigationProp } from '@react-navigation/bottom-tabs';
|
||||||
import { useColorScheme, Platform, Animated, StatusBar, TouchableOpacity, View, Text, AppState, Easing, Dimensions } from 'react-native';
|
import { useColorScheme, Platform, Animated, StatusBar, TouchableOpacity, View, Text, AppState, Easing, Dimensions } from 'react-native';
|
||||||
|
import RNImmersiveMode from 'react-native-immersive-mode';
|
||||||
import { mmkvStorage } from '../services/mmkvStorage';
|
import { mmkvStorage } from '../services/mmkvStorage';
|
||||||
import { PaperProvider, MD3DarkTheme, MD3LightTheme, adaptNavigationTheme } from 'react-native-paper';
|
import { PaperProvider, MD3DarkTheme, MD3LightTheme, adaptNavigationTheme } from 'react-native-paper';
|
||||||
import type { MD3Theme } from 'react-native-paper';
|
import type { MD3Theme } from 'react-native-paper';
|
||||||
|
|
@ -862,7 +863,6 @@ const MainTabs = () => {
|
||||||
// Prefer native lazy/freeze when available; still pass for parity
|
// Prefer native lazy/freeze when available; still pass for parity
|
||||||
lazy: true,
|
lazy: true,
|
||||||
freezeOnBlur: true,
|
freezeOnBlur: true,
|
||||||
tabBarStyle: { display: 'none' },
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IOSTab.Screen
|
<IOSTab.Screen
|
||||||
|
|
@ -922,7 +922,7 @@ const MainTabs = () => {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Tab.Navigator
|
<Tab.Navigator
|
||||||
tabBar={() => null}
|
tabBar={renderTabBar}
|
||||||
screenOptions={({ route, navigation, theme }) => ({
|
screenOptions={({ route, navigation, theme }) => ({
|
||||||
transitionSpec: {
|
transitionSpec: {
|
||||||
animation: 'timing',
|
animation: 'timing',
|
||||||
|
|
@ -1059,6 +1059,14 @@ const InnerNavigator = ({ initialRouteName }: { initialRouteName?: keyof RootSta
|
||||||
// Handle Android-specific optimizations
|
// Handle Android-specific optimizations
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
|
// Hide system navigation bar
|
||||||
|
try {
|
||||||
|
RNImmersiveMode.setBarMode('Bottom');
|
||||||
|
RNImmersiveMode.fullLayout(true);
|
||||||
|
} catch (error) {
|
||||||
|
console.log('Immersive mode error:', error);
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure consistent background color for Android
|
// Ensure consistent background color for Android
|
||||||
StatusBar.setBackgroundColor('transparent', true);
|
StatusBar.setBackgroundColor('transparent', true);
|
||||||
StatusBar.setTranslucent(true);
|
StatusBar.setTranslucent(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue