react-native-unistyles 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://developer.apple.com/ios/)
|
|
11
11
|
[](https://developer.apple.com/macos/)
|
|
12
12
|
[](https://developer.apple.com/tvos/)
|
|
13
|
-
[](https://developer.apple.com/visionos/)
|
|
14
14
|
[](https://developer.android.com/)
|
|
15
15
|
[](https://www.android.com/intl/pl_pl/tv/)
|
|
16
16
|
[](https://microsoft.github.io/react-native-windows/docs/getting-started)
|
|
@@ -244,7 +244,9 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
try {
|
|
247
|
-
activity.
|
|
247
|
+
activity.runOnUiThread {
|
|
248
|
+
activity.window.navigationBarColor = if (color == "") platform.defaultNavigationBarColor!! else Color.parseColor(color)
|
|
249
|
+
}
|
|
248
250
|
} catch (_: Exception) {
|
|
249
251
|
Log.d("Unistyles", "Failed to set navigation bar color: $color")
|
|
250
252
|
}
|
|
@@ -258,7 +260,9 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
|
258
260
|
}
|
|
259
261
|
|
|
260
262
|
try {
|
|
261
|
-
activity.
|
|
263
|
+
activity.runOnUiThread {
|
|
264
|
+
activity.window.statusBarColor = if (color == "") platform.defaultStatusBarColor!! else Color.parseColor(color)
|
|
265
|
+
}
|
|
262
266
|
} catch (_: Exception) {
|
|
263
267
|
Log.d("Unistyles", "Failed to set status bar color: $color")
|
|
264
268
|
}
|