Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

Launch video fixes from review, then the twinkling-stars cut

Rishabh Bajpaiac95da1073d4
diff --git a/app/src/main/java/com/gotcha/ui/SplashOverlay.kt b/app/src/main/java/com/gotcha/ui/SplashOverlay.kt
index 52f8354..0c64860 100644
--- a/app/src/main/java/com/gotcha/ui/SplashOverlay.kt
+++ b/app/src/main/java/com/gotcha/ui/SplashOverlay.kt
@@ -10,8 +10,10 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
+import androidx.compose.foundation.layout.aspectRatio
+import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
@@ -25,11 +27,13 @@ import androidx.compose.ui.draw.alpha
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
-import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
import com.gotcha.R
import kotlinx.coroutines.delay
+/** The footage's own aspect ratio: 1080x1920 portrait. */
+private const val VIDEO_ASPECT = 9f / 16f
+
/** Failsafe: a wedged decoder must never hold the launch hostage. */
private const val SPLASH_TIMEOUT_MS = 12_000L
@@ -94,10 +98,10 @@ fun SplashVideoOverlay(
}
}
- // The video's own near-white ground, matching the window behind it: the
- // square footage around the footage must not read as a panel. Clicks are
- // swallowed whole: the app is live underneath, and a tap aimed at the logo
- // must not land on a control nobody can see yet.
+ // The video's own dark ground, matching the window behind it: the footage
+ // around the video must not read as a panel. Clicks are swallowed whole:
+ // the app is live underneath, and a tap aimed at the logo must not land
+ // on a control nobody can see yet.
Box(
modifier = Modifier
.fillMaxSize()
@@ -110,14 +114,22 @@ fun SplashVideoOverlay(
.alpha(alpha)
) {
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
- val size = minOf(maxWidth, 440.dp)
+ // Scale to fit, never stretch: the footage is 9:16 and phones are
+ // taller, so the height binds and matching ground fills the rest.
+ // A full-bleed crop would eat the logo on narrow screens.
+ val widthToHeight = maxWidth / maxHeight
+ val videoModifier = if (widthToHeight < VIDEO_ASPECT) {
+ Modifier.fillMaxWidth().aspectRatio(VIDEO_ASPECT)
+ } else {
+ Modifier.fillMaxHeight().aspectRatio(VIDEO_ASPECT)
+ }
if (videoFailed) {
Image(
painter = painterResource(R.drawable.splash_logo),
contentDescription = stringResource(R.string.chat_gotcha_logo),
modifier = Modifier
.align(Alignment.Center)
- .size(size)
+ .then(videoModifier)
)
} else {
var player by remember { mutableStateOf<VideoView?>(null) }
@@ -148,7 +160,7 @@ fun SplashVideoOverlay(
},
modifier = Modifier
.align(Alignment.Center)
- .size(size)
+ .then(videoModifier)
)
DisposableEffect(Unit) {
onDispose { player?.stopPlayback() }
diff --git a/app/src/main/res/drawable-xxxhdpi/splash_logo.png b/app/src/main/res/drawable-xxxhdpi/splash_logo.png
index 05d132c..c373cd4 100644
Binary files a/app/src/main/res/drawable-xxxhdpi/splash_logo.png and b/app/src/main/res/drawable-xxxhdpi/splash_logo.png differ
diff --git a/app/src/main/res/raw/gotcha_splash.mp4 b/app/src/main/res/raw/gotcha_splash.mp4
index a0616c3..f327d82 100644
Binary files a/app/src/main/res/raw/gotcha_splash.mp4 and b/app/src/main/res/raw/gotcha_splash.mp4 differ
diff --git a/app/src/main/res/values-night-v31/themes.xml b/app/src/main/res/values-night-v31/themes.xml
index 8060d6f..d6840cd 100644
--- a/app/src/main/res/values-night-v31/themes.xml
+++ b/app/src/main/res/values-night-v31/themes.xml
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Night-mode twin of values-v31/themes.xml. The window still follows the
- night ground, but the splash keeps the video's own light shade: the
- footage is light either way, and a dark splash behind a light logo and
- a light video would flash twice.
+ Night-mode twin of values-v31/themes.xml. The splash matches the video's
+ dark starfield in both modes now; only the window follows the night ground.
-->
<resources>
<style name="Theme.Gotcha" parent="android:Theme.Material.Light.NoActionBar">
diff --git a/app/src/main/res/values-v31/themes.xml b/app/src/main/res/values-v31/themes.xml
index 2ccbad5..da60e69 100644
--- a/app/src/main/res/values-v31/themes.xml
+++ b/app/src/main/res/values-v31/themes.xml
@@ -4,7 +4,7 @@
icon as the launch animation, blown up to splash size from a 432px
adaptive foreground — which is where the blurry logo came from. The
still below is cut from the launch video at full resolution on the same
- near-white ground, so the system splash hands over to the video
+ dark ground, so the system splash hands over to the video
seamlessly.
-->
<resources>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index bb3689b..c627bc5 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -13,9 +13,9 @@
<color name="launch_background">#FBFDF9</color>
<!--
The launch video's own ground, sampled off its first frame. The system
- splash and the video overlay both paint this instead of following night
- mode: the footage is light either way, so the whole chain stays one
- shade from tap to app.
+ splash and the video overlay both paint this in every mode: the footage
+ is a dark starfield either way, so the whole chain stays one shade
+ from tap to app.
-->
- <color name="splash_background">#FBFDFA</color>
+ <color name="splash_background">#060914</color>
</resources>