You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-8.x/themes.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,9 +339,18 @@ On Android, it also provides themes based on Material Design:
339
339
-`MaterialLightTheme`
340
340
-`MaterialDarkTheme`
341
341
342
-
The Material themes use platform colors to provide dynamic colors that adapt to the user's wallpaper and theme preferences.
342
+
The Material themes use platform colors to provide dynamic colors that adapt to the user's wallpaper and theme preferences, and are available on Android 14 (API level 34) and above.
343
343
344
-
You can import the themes from the `@react-navigation/native` package:
344
+
You can use the [`Platform`](https://reactnative.dev/docs/platform) API to fallback to a different theme on unsupported platforms or versions:
345
+
346
+
```js
347
+
constMyTheme=
348
+
Platform.OS==='android'&&Platform.Version>=34
349
+
? MaterialLightTheme
350
+
: DefaultTheme;
351
+
```
352
+
353
+
The themes can be imported from the `@react-navigation/native` package:
0 commit comments