Modern Apps git

← Modern-Apps.git

cast-tv: compact ready, pairing and now playing screens

Commit
26d56b5ce0dac52bb6541844f960233e6edebded
Author
vayun-mathur <[email protected]>
When
2026-10-26 00:25 UTC (1 month ago)
Parents
f50c435

Diff

cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/NowPlaying.kt
diff --git a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/NowPlaying.kt b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/NowPlaying.ktindex eed58d4c1b..04c03a36a2 100644--- a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/NowPlaying.kt+++ b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/NowPlaying.kt@@ -3,7 +3,6 @@ package com.vayunmathur.cast.tv.ui import android.text.format.DateUtils import androidx.compose.foundation.Image import androidx.compose.foundation.background-import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column@@ -21,8 +20,6 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip-import androidx.compose.ui.graphics.Brush-import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.layout.ContentScale@@ -50,10 +47,9 @@ import kotlinx.coroutines.withContext  * `SurfaceView` at all and fills its window with this beside the transport overlay, so  * `ReceiverContent`'s mirroring arm is on screen for a few milliseconds and then never again.  *- * Artwork-led: a big card on the left, title/artist/source on the right with the seek row and- * the play state, lyrics below the title block when the phone sent any. The backdrop is the- * cover itself dimmed under scrims (or an accent gradient with no cover) - local pixels only,- * never anything fetched off the network beyond the phone's own proxy.+ * Compact and flat: an artwork card on the left, metadata with the seek row under it, and the+ * lyrics in a column beside them when the phone sent any. No backdrop - the window is already+ * painted once behind both this and the transport bar, so the two stay one continuous surface.  *  * **Nothing on it is focusable.** There is no input model on this screen - the lyrics scroll  * from the clock, so a scrollable focus target would be a thing the remote could move that@@ -78,87 +74,43 @@ fun NowPlayingScreen(     val cover = rememberArtwork(nowPlaying.artworkResourceId, artwork)     val hasLyrics = nowPlaying.lyrics.isNotEmpty() || nowPlaying.plainLyrics.isNotEmpty() -    Box(modifier = modifier.fillMaxSize()) {-        NowPlayingBackdrop(cover)-        Row(-            modifier = Modifier-                .fillMaxSize()-                .padding(-                    start = TvDimens.SafeHorizontal,-                    end = TvDimens.SafeHorizontal,-                    top = TvDimens.SafeVertical,-                    bottom = 16.dp,-                ),-            horizontalArrangement = Arrangement.spacedBy(48.dp),-            verticalAlignment = Alignment.CenterVertically,+    Row(+        modifier = modifier+            .fillMaxSize()+            .padding(+                start = TvDimens.SafeHorizontal,+                end = TvDimens.SafeHorizontal,+                top = TvDimens.SafeVertical,+                bottom = 16.dp,+            ),+        horizontalArrangement = Arrangement.spacedBy(48.dp),+    ) {+        Column(+            modifier = Modifier.weight(NOW_PLAYING_WEIGHT),+            verticalArrangement = Arrangement.spacedBy(12.dp),         ) {             // **Sized from the height it is given, never from a constant.** Squaring a filled             // height cannot overflow whatever the window turns out to be.-            ArtworkCard(cover, Modifier.fillMaxHeight())-            Column(-                modifier = Modifier.weight(1f).fillMaxHeight(),-                verticalArrangement = Arrangement.spacedBy(12.dp),-            ) {-                // **The title replaces the app's name rather than sitting beside it.** A user-                // looking at a track already knows which app they started; the source survives-                // as the eyebrow above it.-                TitleBlock(-                    title = nowPlaying.title,-                    author = nowPlaying.author,-                    album = nowPlaying.album,-                    sourceName = sourceName,-                    snapshot = snapshot,-                )-                NowPlayingProgress(positionMs = positionMs, snapshot = snapshot)-                if (hasLyrics) {-                    Lyrics(-                        nowPlaying = nowPlaying,-                        positionMs = positionMs,-                        modifier = Modifier.weight(1f).fillMaxWidth(),-                    )-                }-            }-        }-    }-}--/**- * The cover dimmed under scrims, or an accent gradient with no cover.- *- * A mask-free scrim rather than a second background owner: `MirrorActivity` paints the window- * once behind both this and the transport bar, so the two stay one continuous surface.- */-@Composable-private fun NowPlayingBackdrop(cover: ImageBitmap?) {-    val scheme = MaterialTheme.colorScheme-    Box(Modifier.fillMaxSize()) {-        if (cover != null) {-            Image(-                bitmap = cover,-                contentDescription = null,-                modifier = Modifier.fillMaxSize(),-                contentScale = ContentScale.Crop,-                alpha = BACKDROP_ALPHA,+            ArtworkCard(cover, Modifier.fillMaxWidth())+            // **The title replaces the app's name rather than sitting beside it.** A user+            // looking at a track already knows which app they started; the source survives+            // as the eyebrow above it.+            TitleBlock(+                title = nowPlaying.title,+                author = nowPlaying.author,+                album = nowPlaying.album,+                sourceName = sourceName,+                snapshot = snapshot,             )-        } else {-            Box(-                Modifier.fillMaxSize().background(-                    Brush.verticalGradient(-                        0f to scheme.primaryContainer.copy(alpha = 0.35f),-                        1f to Color.Transparent,-                    ),-                ),+            NowPlayingProgress(positionMs = positionMs, snapshot = snapshot)+        }+        if (hasLyrics) {+            Lyrics(+                nowPlaying = nowPlaying,+                positionMs = positionMs,+                modifier = Modifier.weight(LYRICS_WEIGHT).fillMaxHeight(),             )         }-        Box(-            Modifier.fillMaxSize().background(-                Brush.verticalGradient(-                    0f to scheme.background.copy(alpha = 0.45f),-                    0.5f to scheme.background.copy(alpha = 0.72f),-                    1f to scheme.background,-                ),-            ),-        )     } } @@ -172,13 +124,12 @@ private fun NowPlayingBackdrop(cover: ImageBitmap?) { @Composable private fun ArtworkCard(cover: ImageBitmap?, modifier: Modifier) {     val scheme = MaterialTheme.colorScheme-    val shape = MaterialTheme.shapes.large+    val shape = MaterialTheme.shapes.medium     Box(         modifier = modifier             .aspectRatio(1f)             .clip(shape)-            .background(scheme.surfaceVariant)-            .border(2.dp, scheme.primary.copy(alpha = 0.5f), shape),+            .background(scheme.surfaceVariant),         contentAlignment = Alignment.Center,     ) {         if (cover != null) {@@ -292,4 +243,8 @@ private fun rememberArtwork(resourceId: String, artwork: ArtworkFetcher?): Image     return bitmap } -private const val BACKDROP_ALPHA = 0.22f+/** The metadata column's share of the row; the lyrics take the rest when present. */+private const val NOW_PLAYING_WEIGHT = 1f++/** Lyrics take more room than the cover column, so several lines stay on screen. */+private const val LYRICS_WEIGHT = 1.2f
cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/PairingScreen.kt
diff --git a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/PairingScreen.kt b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/PairingScreen.ktindex 725d2eca2b..e42c897f9d 100644--- a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/PairingScreen.kt+++ b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/PairingScreen.kt@@ -1,14 +1,11 @@ package com.vayunmathur.cast.tv.ui  import androidx.compose.foundation.background-import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement-import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column-import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize+import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding-import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier@@ -17,19 +14,19 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp+import androidx.compose.ui.unit.sp import androidx.tv.material3.MaterialTheme import androidx.tv.material3.Text import com.vayunmathur.cast.tv.R import com.vayunmathur.library.tv.TvDimens  /**- * The pairing code, as huge individual digit tiles.+ * The pairing code, very large and otherwise undecorated.  *- * The one thing on this screen the user reads from across a room and copies exactly, so each- * digit gets its own accent-bordered box in `displayLarge` with a monospaced feel - chunks and- * spacing carry over from the old layout, which grouped the same way for the same reason. Above- * it, who is asking; below it, how many tries are left, or the notice that the code was replaced- * after three wrong attempts.+ * The one thing on this screen the user reads from across a room and copies exactly, so it is+ * huge monospaced type with the same "123 456" grouping as ever, sitting in one card in the+ * phone app's card language: who is asking above it, tries left (or the replaced-code notice)+ * below it. No tiles, no borders, no glow.  *  * Nothing is focusable: there is no input on this screen (the typing happens on the phone), so  * a focus target would be a thing the D-pad could reach that does nothing.@@ -53,72 +50,68 @@ fun PairingScreen(                 top = TvDimens.SafeVertical,                 bottom = TvDimens.SafeVertical,             ),-        verticalArrangement = Arrangement.spacedBy(28.dp, Alignment.CenterVertically),+        verticalArrangement = Arrangement.Center,         horizontalAlignment = Alignment.CenterHorizontally,     ) {-        Text(-            text = stringResource(R.string.tv_pair_from, senderName),-            style = MaterialTheme.typography.headlineSmall,-            color = scheme.onSurfaceVariant,-            textAlign = TextAlign.Center,-        )-        Text(-            text = stringResource(R.string.tv_pair_title),-            style = MaterialTheme.typography.headlineMedium,-            color = scheme.onSurface,-            textAlign = TextAlign.Center,-        )-        DigitTiles(code)-        if (codeChanged) {+        Column(+            modifier = Modifier+                .fillMaxWidth(fraction = CODE_CARD_WIDTH_FRACTION)+                .background(scheme.surface, MaterialTheme.shapes.medium)+                .padding(horizontal = 32.dp, vertical = 28.dp),+            verticalArrangement = Arrangement.spacedBy(16.dp),+            horizontalAlignment = Alignment.CenterHorizontally,+        ) {             Text(-                text = stringResource(R.string.tv_pair_new_code),-                style = MaterialTheme.typography.titleMedium,-                color = scheme.error,+                text = stringResource(R.string.tv_pair_from, senderName),+                style = MaterialTheme.typography.titleLarge,+                color = scheme.onSurface,                 textAlign = TextAlign.Center,             )-        } else {             Text(-                text = pluralStringResource(R.plurals.tv_pair_attempts, attemptsLeft, attemptsLeft),-                style = MaterialTheme.typography.titleMedium,+                text = stringResource(R.string.tv_pair_title),+                style = MaterialTheme.typography.bodyLarge,                 color = scheme.onSurfaceVariant,                 textAlign = TextAlign.Center,             )+            Code(code)+            if (codeChanged) {+                Text(+                    text = stringResource(R.string.tv_pair_new_code),+                    style = MaterialTheme.typography.titleMedium,+                    color = scheme.error,+                    textAlign = TextAlign.Center,+                )+            } else {+                Text(+                    text = pluralStringResource(R.plurals.tv_pair_attempts, attemptsLeft, attemptsLeft),+                    style = MaterialTheme.typography.titleMedium,+                    color = scheme.onSurfaceVariant,+                    textAlign = TextAlign.Center,+                )+            }         }     } } +/** The six digits, huge and monospaced, grouped the way they are read out. */ @Composable-private fun DigitTiles(code: String) {-    val scheme = MaterialTheme.colorScheme-    val shape = MaterialTheme.shapes.medium-    Row(-        horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally),-    ) {-        code.chunked(3).forEachIndexed { chunkIndex, chunk ->-            Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) {-                chunk.forEach { digit ->-                    Box(-                        modifier = Modifier-                            .size(width = 112.dp, height = 148.dp)-                            .background(scheme.surface, shape)-                            .border(3.dp, scheme.primary, shape),-                        contentAlignment = Alignment.Center,-                    ) {-                        Text(-                            text = digit.toString(),-                            style = MaterialTheme.typography.displayLarge.copy(-                                fontFamily = FontFamily.Monospace,-                            ),-                            color = scheme.onSurface,-                            textAlign = TextAlign.Center,-                        )-                    }-                }-            }-            // A breath between the two halves of the code, matching the old "123  456" grouping.-            if (chunkIndex == 0 && code.length > 3) {-                Box(Modifier.size(16.dp))-            }-        }-    }+private fun Code(code: String, modifier: Modifier = Modifier) {+    Text(+        text = code.chunked(CODE_CHUNK).joinToString(separator = CODE_GAP),+        style = MaterialTheme.typography.displayLarge.copy(+            fontFamily = FontFamily.Monospace,+            fontSize = CODE_SIZE_SP.sp,+            letterSpacing = CODE_LETTER_SPACING_SP.sp,+        ),+        color = MaterialTheme.colorScheme.onSurface,+        textAlign = TextAlign.Center,+        maxLines = 1,+        modifier = modifier,+    ) }++private const val CODE_CHUNK = 3+private const val CODE_GAP = "  "+private const val CODE_SIZE_SP = 96+private const val CODE_LETTER_SPACING_SP = 4+private const val CODE_CARD_WIDTH_FRACTION = 0.62f
cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/ReadyScreen.kt
diff --git a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/ReadyScreen.kt b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/ReadyScreen.ktindex 329767f6e8..6364e4b632 100644--- a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/ReadyScreen.kt+++ b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/ReadyScreen.kt@@ -18,12 +18,11 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier-import androidx.compose.ui.draw.shadow import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource-import androidx.compose.ui.text.style.TextAlign+import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleEventObserver@@ -35,8 +34,6 @@ import com.vayunmathur.library.tv.TvButton import com.vayunmathur.library.tv.TvDimens import com.vayunmathur.library.tv.TvIcon import com.vayunmathur.library.tv.TvInitialFocus-import com.vayunmathur.library.ui.IconCast-import com.vayunmathur.library.ui.IconDialpad import com.vayunmathur.library.ui.IconLock import com.vayunmathur.library.ui.IconTv import com.vayunmathur.library.ui.SpecialAccess@@ -44,10 +41,11 @@ import com.vayunmathur.library.ui.SpecialAccess /**  * The ambient idle screen: what the TV shows while it waits for a phone.  *- * Calm rather than empty. The device name is the headline (it is what the phone's device list- * shows, so matching it is the whole task), a cast glyph with an accent glow anchors the middle,- * and three step cards say how to cast. The footer states the privacy facts the product is built- * on - offline, E2EE, no account - plus the network name/IP when the receiver could read it.+ * Two columns that use the width, in the phone app's card language: on the left a card naming+ * this TV (the name the phone's device list shows, so matching it is the whole task) with its+ * ready status and network line, then the auto-open hint while it is still needed and the+ * privacy facts as a plain line; on the right one card with the three steps. Vertically+ * centred so the pair sits mid-screen. No glyph, no hero.  *  * Paints its own background: the theme deliberately paints nothing, because the same theme wraps  * an overlay above a decoder surface that must stay transparent.@@ -55,7 +53,7 @@ import com.vayunmathur.library.ui.SpecialAccess @Composable fun ReadyScreen(deviceName: String, networkLabel: String, modifier: Modifier = Modifier) {     val scheme = MaterialTheme.colorScheme-    Column(+    Row(         modifier = modifier             .fillMaxSize()             .background(scheme.background)@@ -65,151 +63,135 @@ fun ReadyScreen(deviceName: String, networkLabel: String, modifier: Modifier = M                 top = TvDimens.SafeVertical,                 bottom = TvDimens.SafeVertical,             ),-        verticalArrangement = Arrangement.SpaceBetween,-        horizontalAlignment = Alignment.CenterHorizontally,+        horizontalArrangement = Arrangement.spacedBy(24.dp),+        verticalAlignment = Alignment.CenterVertically,     ) {         Column(-            horizontalAlignment = Alignment.CenterHorizontally,-            verticalArrangement = Arrangement.spacedBy(20.dp),-            modifier = Modifier.padding(top = 24.dp),+            modifier = Modifier.weight(1f),+            verticalArrangement = Arrangement.spacedBy(16.dp),         ) {-            CastGlyph()-            Text(-                text = deviceName,-                style = MaterialTheme.typography.displayMedium,-                color = scheme.onSurface,-                textAlign = TextAlign.Center,-                maxLines = 1,-            )+            DeviceCard(deviceName = deviceName, networkLabel = networkLabel)+            AutoOpenHintCard()             Text(-                text = stringResource(R.string.tv_ready_title),-                style = MaterialTheme.typography.titleLarge,+                text = stringResource(R.string.tv_privacy_facts),+                style = MaterialTheme.typography.bodyMedium,                 color = scheme.onSurfaceVariant,-                textAlign = TextAlign.Center,             )         }+        HowToCard(deviceName = deviceName, modifier = Modifier.weight(1f))+    }+} -        HowToSteps(deviceName = deviceName)--        Column(-            horizontalAlignment = Alignment.CenterHorizontally,-            verticalArrangement = Arrangement.spacedBy(12.dp),+/** This TV: its name, its ready status, and the network line when the receiver could read it. */+@Composable+private fun DeviceCard(deviceName: String, networkLabel: String, modifier: Modifier = Modifier) {+    val scheme = MaterialTheme.colorScheme+    Row(+        modifier = modifier+            .fillMaxWidth()+            .background(scheme.surface, MaterialTheme.shapes.medium)+            .padding(24.dp),+        horizontalArrangement = Arrangement.spacedBy(20.dp),+        verticalAlignment = Alignment.CenterVertically,+    ) {+        Box(+            modifier = Modifier+                .size(56.dp)+                .background(scheme.primaryContainer, CircleShape),+            contentAlignment = Alignment.Center,         ) {-            AutoOpenHintCard()+            Box(Modifier.size(28.dp), contentAlignment = Alignment.Center) {+                TvIcon { IconTv() }+            }+        }+        Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {             Text(-                text = stringResource(R.string.tv_privacy_facts),-                style = MaterialTheme.typography.bodyMedium,-                color = scheme.onSurfaceVariant,-                textAlign = TextAlign.Center,+                text = deviceName,+                style = MaterialTheme.typography.headlineSmall,+                color = scheme.onSurface,+                maxLines = 1,+                overflow = TextOverflow.Ellipsis,+            )+            Text(+                text = stringResource(R.string.tv_ready_title),+                style = MaterialTheme.typography.titleMedium,+                color = scheme.primary,             )             if (networkLabel.isNotBlank()) {                 Text(                     text = stringResource(R.string.tv_network_line, networkLabel),                     style = MaterialTheme.typography.bodyMedium,-                    color = scheme.onSurfaceVariant.copy(alpha = 0.75f),-                    textAlign = TextAlign.Center,+                    color = scheme.onSurfaceVariant,                 )             }         }     } } -/**- * The cast glyph with a soft accent glow: the visual anchor of the idle screen, echoing the- * phone app's cast mark without any of its touch chrome.- */+/** The three "how to cast" steps, as compact numbered rows in one card. */ @Composable-private fun CastGlyph() {+private fun HowToCard(deviceName: String, modifier: Modifier = Modifier) {     val scheme = MaterialTheme.colorScheme-    Box(-        modifier = Modifier-            .size(120.dp)-            .shadow(32.dp, CircleShape, ambientColor = scheme.primary, spotColor = scheme.primary)-            .background(scheme.primaryContainer, CircleShape),-        contentAlignment = Alignment.Center,-    ) {-        Box(Modifier.size(56.dp), contentAlignment = Alignment.Center) {-            TvIcon { IconCast() }-        }-    }-}--/** The three "how to cast" steps, as a row of cards readable from across the room. */-@Composable-private fun HowToSteps(deviceName: String) {-    Row(-        modifier = Modifier.fillMaxWidth(),-        horizontalArrangement = Arrangement.spacedBy(20.dp, Alignment.CenterHorizontally),+    Column(+        modifier = modifier+            .fillMaxWidth()+            .background(scheme.surface, MaterialTheme.shapes.medium)+            .padding(24.dp),+        verticalArrangement = Arrangement.spacedBy(20.dp),     ) {-        StepCard(+        Step(             number = "1",             title = stringResource(R.string.tv_howto_step1_title),             body = stringResource(R.string.tv_howto_step1_body),-            icon = { IconTv() },-            modifier = Modifier.weight(1f),         )-        StepCard(+        Step(             number = "2",             title = stringResource(R.string.tv_howto_step2_title, deviceName),             body = stringResource(R.string.tv_howto_step2_body),-            icon = { IconCast() },-            modifier = Modifier.weight(1f),         )-        StepCard(+        Step(             number = "3",             title = stringResource(R.string.tv_howto_step3_title),             body = stringResource(R.string.tv_howto_step3_body),-            icon = { IconDialpad() },-            modifier = Modifier.weight(1f),         )     } }  @Composable-private fun StepCard(-    number: String,-    title: String,-    body: String,-    icon: @Composable () -> Unit,-    modifier: Modifier = Modifier,-) {+private fun Step(number: String, title: String, body: String, modifier: Modifier = Modifier) {     val scheme = MaterialTheme.colorScheme-    Column(-        modifier = modifier-            .background(scheme.surface, MaterialTheme.shapes.medium)-            .padding(24.dp),-        verticalArrangement = Arrangement.spacedBy(10.dp),+    Row(+        modifier = modifier.fillMaxWidth(),+        horizontalArrangement = Arrangement.spacedBy(16.dp),+        verticalAlignment = Alignment.Top,     ) {-        Row(-            verticalAlignment = Alignment.CenterVertically,-            horizontalArrangement = Arrangement.spacedBy(12.dp),+        Box(+            modifier = Modifier+                .size(36.dp)+                .background(scheme.primaryContainer, CircleShape),+            contentAlignment = Alignment.Center,         ) {-            Box(-                modifier = Modifier-                    .size(44.dp)-                    .background(scheme.primaryContainer, CircleShape),-                contentAlignment = Alignment.Center,-            ) {-                Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) {-                    TvIcon(icon)-                }-            }             Text(                 text = number,-                style = MaterialTheme.typography.headlineSmall,+                style = MaterialTheme.typography.titleMedium,                 color = scheme.primary,             )         }-        Text(-            text = title,-            style = MaterialTheme.typography.titleMedium,-            color = scheme.onSurface,-        )-        Text(-            text = body,-            style = MaterialTheme.typography.bodyMedium,-            color = scheme.onSurfaceVariant,-        )+        Column(+            modifier = Modifier.weight(1f),+            verticalArrangement = Arrangement.spacedBy(2.dp),+        ) {+            Text(+                text = title,+                style = MaterialTheme.typography.titleMedium,+                color = scheme.onSurface,+            )+            Text(+                text = body,+                style = MaterialTheme.typography.bodyMedium,+                color = scheme.onSurfaceVariant,+            )+        }     } } 
cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/Theme.kt
diff --git a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/Theme.kt b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/Theme.ktindex 60fac93ac0..c63a6d1636 100644--- a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/Theme.kt+++ b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/Theme.kt@@ -12,9 +12,9 @@ import com.vayunmathur.library.tv.TvAccent  *  * **Paints nothing.** Deliberately not `Surface`, and not a `Box` with the scheme's background:  * one of the two things wrapped in this theme is an overlay above a decoder surface, and anything- * opaque here would be a solid rectangle over the video for the whole session. `MaTvTheme` only- * installs the colour scheme and content colours (verified in `library/tv/TvTheme.kt`), so that- * property carries over. Screens that want a background say so themselves.+ * opaque here would be a solid rectangle over the video for the whole session. `MaTvTheme`+ * only installs colour schemes and content colours, so that property carries over. Screens+ * that want a background say so themselves.  */ @Composable fun CastTvTheme(content: @Composable () -> Unit) {
cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/TransportOverlay.kt
diff --git a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/TransportOverlay.kt b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/TransportOverlay.ktindex 2c2f0983d0..fc0812644f 100644--- a/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/TransportOverlay.kt+++ b/cast/tv/src/main/java/com/vayunmathur/cast/tv/ui/TransportOverlay.kt@@ -23,6 +23,7 @@ import com.vayunmathur.cast.protocol.PlaybackCommand import com.vayunmathur.cast.tv.R import com.vayunmathur.cast.tv.platform.PlaybackSnapshot import com.vayunmathur.cast.tv.platform.ReceiverController+import com.vayunmathur.library.tv.TvDimens import com.vayunmathur.library.tv.TvIconButton import com.vayunmathur.library.tv.TvSeekRow import com.vayunmathur.library.ui.IconPause@@ -84,8 +85,8 @@ fun TransportOverlay(                     Modifier                 },             )-            .padding(horizontal = 48.dp, vertical = 24.dp),-        verticalArrangement = Arrangement.spacedBy(12.dp),+            .padding(horizontal = TvDimens.SafeHorizontal, vertical = 16.dp),+        verticalArrangement = Arrangement.spacedBy(8.dp),     ) {         TitleBlock(             nowPlaying = nowPlaying,
cast/tv/src/main/res/values/strings.xml
diff --git a/cast/tv/src/main/res/values/strings.xml b/cast/tv/src/main/res/values/strings.xmlindex 252ea3ba59..852371cade 100644--- a/cast/tv/src/main/res/values/strings.xml+++ b/cast/tv/src/main/res/values/strings.xml@@ -3,7 +3,6 @@      <!-- Idle screen -->     <string name="tv_ready_title">Ready to receive</string>-    <string name="tv_ready_hint">Open Cast on your phone and pick %1$s.</string>     <string name="tv_name_unknown">this TV</string>     <string name="tv_starting">Starting.</string>