craft-native 0.0.232 → 0.0.233
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.
|
@@ -4563,12 +4563,28 @@ class MainActivity : AppCompatActivity() {
|
|
|
4563
4563
|
}
|
|
4564
4564
|
|
|
4565
4565
|
/** Applies a screen-specific background, falling back to the dynamic app colour. */
|
|
4566
|
+
@Suppress("DEPRECATION")
|
|
4566
4567
|
private fun applyScreenBackground(screen: Screen) {
|
|
4567
4568
|
val configured = screen.options.opt("backgroundColor")
|
|
4568
4569
|
?.takeUnless { it == JSONObject.NULL }
|
|
4569
4570
|
?.let { craftNativeOptionalString(it) }
|
|
4570
4571
|
?.let { runCatching { craftNativeColor(it) }.getOrNull() }
|
|
4571
|
-
|
|
4572
|
+
val background = configured ?: ContextCompat.getColor(this, R.color.background)
|
|
4573
|
+
screen.view.setBackgroundColor(background)
|
|
4574
|
+
// The root also paints the window-inset padding above/below the
|
|
4575
|
+
// screen. Retained screens still receive options and theme updates;
|
|
4576
|
+
// only the visible one may change the colour behind system bars.
|
|
4577
|
+
if (visibleScreen === screen) {
|
|
4578
|
+
root.setBackgroundColor(background)
|
|
4579
|
+
WindowCompat.getInsetsController(window, window.decorView)
|
|
4580
|
+
.isAppearanceLightNavigationBars = Color.luminance(background) >= 0.5f
|
|
4581
|
+
// Android 15+ draws the root behind transparent system bars.
|
|
4582
|
+
// Older releases still paint separate window bar surfaces.
|
|
4583
|
+
if (Build.VERSION.SDK_INT < 35) {
|
|
4584
|
+
window.statusBarColor = background
|
|
4585
|
+
window.navigationBarColor = background
|
|
4586
|
+
}
|
|
4587
|
+
}
|
|
4572
4588
|
}
|
|
4573
4589
|
|
|
4574
4590
|
/** Refresh controls use a contrasting system tint when no color is authored. */
|
package/dist/cli.js
CHANGED
|
@@ -3424,7 +3424,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
|
|
|
3424
3424
|
`);
|
|
3425
3425
|
}
|
|
3426
3426
|
// package.json
|
|
3427
|
-
var version = "0.0.
|
|
3427
|
+
var version = "0.0.233";
|
|
3428
3428
|
|
|
3429
3429
|
// bin/cli.ts
|
|
3430
3430
|
var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED