From 8802655953ad01b0e38f67611706582c51f09340 Mon Sep 17 00:00:00 2001 From: Alan Lee Date: Thu, 9 Jan 2025 13:46:34 -0800 Subject: [PATCH 1/2] Add Android only hacking padding to support forced edge-to-edge w/ targetSdk 35. This is to avoid importing react-native-safe-area-context library which is the recommended approach but omitting here to reduce external dependency. --- template/App.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/template/App.tsx b/template/App.tsx index 125fe1b..7613eb1 100644 --- a/template/App.tsx +++ b/template/App.tsx @@ -8,6 +8,7 @@ import React from 'react'; import type {PropsWithChildren} from 'react'; import { + Platform, SafeAreaView, ScrollView, StatusBar, @@ -62,6 +63,9 @@ function App(): React.JSX.Element { backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, }; + // Note: adding hacky padding to avoid importing rn-safe-area-context library but should not be done in production + const hackyPadding = Platform.OS === 'android' ? '5%' : 0; + return ( -
+ +
+
Edit App.tsx to change this From f369ac1bd3f1c1b3786fd1c6b38852526693e5dc Mon Sep 17 00:00:00 2001 From: Alan Lee Date: Thu, 9 Jan 2025 13:47:45 -0800 Subject: [PATCH 2/2] update Android targetSdkVersion to 35 --- template/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/android/build.gradle b/template/android/build.gradle index a62d6da..9766946 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -3,7 +3,7 @@ buildscript { buildToolsVersion = "35.0.0" minSdkVersion = 24 compileSdkVersion = 35 - targetSdkVersion = 34 + targetSdkVersion = 35 ndkVersion = "27.1.12297006" kotlinVersion = "2.0.21" }