Skip to content

Commit 591fa0c

Browse files
committed
add navigator and fix android bug
1 parent 691eb86 commit 591fa0c

File tree

7 files changed

+348
-7
lines changed

7 files changed

+348
-7
lines changed

App.tsx

+13-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import React from "react";
22
import {SafeAreaView, useColorScheme} from "react-native";
33
import {Colors} from "react-native/Libraries/NewAppScreen";
44
import {MovieScreen} from "./src/screens/MovieScreen";
5+
import {createNativeStackNavigator} from "@react-navigation/native-stack";
6+
import {NavigationContainer} from "@react-navigation/native";
7+
8+
const Stack = createNativeStackNavigator();
59

610
function App(): React.JSX.Element {
711
const isDarkMode = useColorScheme() === "dark";
@@ -12,9 +16,15 @@ function App(): React.JSX.Element {
1216
};
1317

1418
return (
15-
<SafeAreaView style={backgroundStyle}>
16-
<MovieScreen />
17-
</SafeAreaView>
19+
<NavigationContainer>
20+
<Stack.Navigator>
21+
<Stack.Screen
22+
name="Discover-Movies"
23+
component={MovieScreen}
24+
options={{title: "Discover Movies"}}
25+
/>
26+
</Stack.Navigator>
27+
</NavigationContainer>
1828
);
1929
}
2030

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
minSdkVersion = 23
55
compileSdkVersion = 34
66
targetSdkVersion = 34
7-
ndkVersion = "26.1.10909125"
7+
ndkVersion = "25.2.9519653"
88
kotlinVersion = "1.9.22"
99
}
1010
repositories {

ios/Podfile.lock

+32
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ PODS:
935935
- React-Mapbuffer (0.74.3):
936936
- glog
937937
- React-debug
938+
- react-native-safe-area-context (4.10.8):
939+
- React-Core
938940
- React-nativeconfig (0.74.3)
939941
- React-NativeModulesApple (0.74.3):
940942
- glog
@@ -1164,6 +1166,28 @@ PODS:
11641166
- React-logger (= 0.74.3)
11651167
- React-perflogger (= 0.74.3)
11661168
- React-utils (= 0.74.3)
1169+
- RNScreens (3.32.0):
1170+
- DoubleConversion
1171+
- glog
1172+
- hermes-engine
1173+
- RCT-Folly (= 2024.01.01.00)
1174+
- RCTRequired
1175+
- RCTTypeSafety
1176+
- React-Codegen
1177+
- React-Core
1178+
- React-debug
1179+
- React-Fabric
1180+
- React-featureflags
1181+
- React-graphics
1182+
- React-ImageManager
1183+
- React-NativeModulesApple
1184+
- React-RCTFabric
1185+
- React-RCTImage
1186+
- React-rendererdebug
1187+
- React-utils
1188+
- ReactCommon/turbomodule/bridging
1189+
- ReactCommon/turbomodule/core
1190+
- Yoga
11671191
- SocketRocket (0.7.0)
11681192
- Yoga (0.0.0)
11691193

@@ -1200,6 +1224,7 @@ DEPENDENCIES:
12001224
- React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`)
12011225
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
12021226
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
1227+
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
12031228
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
12041229
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
12051230
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
@@ -1223,6 +1248,7 @@ DEPENDENCIES:
12231248
- React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
12241249
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
12251250
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
1251+
- RNScreens (from `../node_modules/react-native-screens`)
12261252
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
12271253

12281254
SPEC REPOS:
@@ -1291,6 +1317,8 @@ EXTERNAL SOURCES:
12911317
:path: "../node_modules/react-native/ReactCommon/logger"
12921318
React-Mapbuffer:
12931319
:path: "../node_modules/react-native/ReactCommon"
1320+
react-native-safe-area-context:
1321+
:path: "../node_modules/react-native-safe-area-context"
12941322
React-nativeconfig:
12951323
:path: "../node_modules/react-native/ReactCommon"
12961324
React-NativeModulesApple:
@@ -1337,6 +1365,8 @@ EXTERNAL SOURCES:
13371365
:path: "../node_modules/react-native/ReactCommon/react/utils"
13381366
ReactCommon:
13391367
:path: "../node_modules/react-native/ReactCommon"
1368+
RNScreens:
1369+
:path: "../node_modules/react-native-screens"
13401370
Yoga:
13411371
:path: "../node_modules/react-native/ReactCommon/yoga"
13421372

@@ -1371,6 +1401,7 @@ SPEC CHECKSUMS:
13711401
React-jsitracing: 6b3c8c98313642140530f93c46f5a6ca4530b446
13721402
React-logger: fa92ba4d3a5d39ac450f59be2a3cec7b099f0304
13731403
React-Mapbuffer: 9f68550e7c6839d01411ac8896aea5c868eff63a
1404+
react-native-safe-area-context: b7daa1a8df36095a032dff095a1ea8963cb48371
13741405
React-nativeconfig: fa5de9d8f4dbd5917358f8ad3ad1e08762f01dcb
13751406
React-NativeModulesApple: 585d1b78e0597de364d259cb56007052d0bda5e5
13761407
React-perflogger: 7bb9ba49435ff66b666e7966ee10082508a203e8
@@ -1394,6 +1425,7 @@ SPEC CHECKSUMS:
13941425
React-runtimescheduler: 0c80752bceb80924cb8a4babc2a8e3ed70d41e87
13951426
React-utils: a06061b3887c702235d2dac92dacbd93e1ea079e
13961427
ReactCommon: f00e436b3925a7ae44dfa294b43ef360fbd8ccc4
1428+
RNScreens: 5aeecbb09aa7285379b6e9f3c8a3c859bb16401c
13971429
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
13981430
Yoga: 04f1db30bb810187397fa4c37dd1868a27af229c
13991431

0 commit comments

Comments
 (0)