StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
Revamp Movie/Series UI with premium vertical posters, improve M3U setup, and update branding assets
Davidona38d9df4264d8
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xmlindex 4c410ca0..775ff5b3 100644--- a/app/src/main/AndroidManifest.xml+++ b/app/src/main/AndroidManifest.xml@@ -16,8 +16,8 @@<applicationandroid:name=".StreamVaultApp"android:allowBackup="true"- android:banner="@mipmap/ic_launcher"- android:icon="@mipmap/ic_launcher"+ android:banner="@drawable/app_banner"+ android:icon="@mipmap/ic_launcher_vault"android:label="StreamVault"android:supportsRtl="true"android:theme="@style/Theme.StreamVault">diff --git a/app/src/main/java/com/streamvault/app/ui/components/Cards.kt b/app/src/main/java/com/streamvault/app/ui/components/Cards.ktindex 535e9819..ab36ba3a 100644--- a/app/src/main/java/com/streamvault/app/ui/components/Cards.kt+++ b/app/src/main/java/com/streamvault/app/ui/components/Cards.kt@@ -55,9 +55,9 @@ fun FocusableCard(// In reorder mode, only the dragging item scales. Otherwise grid is static.val scale by animateFloatAsState(targetValue = if (isFocused) {- if (isReorderMode && !isDragging) 1f else 1.05f // PREMIUM: 1.05x instead of 1.08x+ if (isReorderMode && !isDragging) 1f else 1.1f // PREMIUM: 1.1x for better visibility} else {- if (isDragging) 1.05f else 1f+ if (isDragging) 1.1f else 1f},animationSpec = tween(durationMillis = 200, easing = FastOutSlowInEasing), // PREMIUM: 200mslabel = "scale"@@ -80,7 +80,7 @@ fun FocusableCard(scaleY = scalethis.shadowElevation = shadowElevationshape = RoundedCornerShape(12.dp)- clip = false+ clip = false // PREMIUM: Allow focus border and shadow to show outside}.onFocusChanged { isFocused = it.isFocused },shape = ClickableSurfaceDefaults.shape(RoundedCornerShape(12.dp)), // PREMIUM: 12dp@@ -255,7 +255,7 @@ fun MovieCard(modifier: Modifier = Modifier,onLongClick: (() -> Unit)? = null,isLocked: Boolean = false,- watchProgress: Float = 0f, // 0..1 from playback history+ watchProgress: Float = 0f,isReorderMode: Boolean = false,isDragging: Boolean = false) {@@ -263,16 +263,21 @@ fun MovieCard(onClick = onClick,onLongClick = onLongClick,modifier = modifier,- width = 240.dp,- height = 135.dp+ width = 160.dp, // PREMIUM: Vertical aspect ratio+ height = 240.dp,+ isReorderMode = isReorderMode,+ isDragging = isDragging) { isFocused ->// Poster imageif (!movie.posterUrl.isNullOrBlank() && !isLocked) {AsyncImage(model = movie.posterUrl,contentDescription = movie.name,- modifier = Modifier.fillMaxSize().clip(RoundedCornerShape(10.dp)),- contentScale = ContentScale.Crop+ modifier = Modifier+ .fillMaxSize()+ .clip(RoundedCornerShape(12.dp)) // PREMIUM: Clip poster to card shape+ .background(SurfaceElevated), // Background for non-standard posters+ contentScale = ContentScale.Fit // PREMIUM: Fits entire poster inside card)} else {Box(@@ -281,20 +286,20 @@ fun MovieCard() {Text(text = if (isLocked) "π" else "π¬",- style = MaterialTheme.typography.headlineLarge+ style = MaterialTheme.typography.displayMedium)}}- // Bottom gradient overlay+ // Bottom gradient overlay - Higher for vertical textBox(modifier = Modifier.align(Alignment.BottomCenter).fillMaxWidth()- .fillMaxHeight(0.5f)+ .fillMaxHeight(0.6f).background(Brush.verticalGradient(- colors = listOf(Color.Transparent, GradientOverlayBottom),+ colors = listOf(Color.Transparent, Color.Black.copy(alpha = 0.85f)),)))@@ -304,33 +309,26 @@ fun MovieCard(modifier = Modifier.align(Alignment.BottomStart).fillMaxWidth()- .padding(horizontal = 8.dp, vertical = 6.dp),+ .padding(12.dp), // Increased paddingverticalArrangement = Arrangement.spacedBy(2.dp)) {Text(text = if (isLocked) stringResource(R.string.card_locked) else movie.name,style = MaterialTheme.typography.titleSmall,- color = TextPrimary,+ color = Color.White,maxLines = 2,overflow = TextOverflow.Ellipsis)if (!isLocked && movie.year != null) {- val year = movie.year- val genre = movie.genreText(- text = buildString {- append(year)- if (!genre.isNullOrBlank()) append(" Β· ${genre.take(20)}")- },+ text = movie.year!!,style = MaterialTheme.typography.labelMedium,- color = TextTertiary,- maxLines = 1,- overflow = TextOverflow.Ellipsis+ color = Color.White.copy(alpha = 0.7f))}}- // Watch progress bar at very bottom edge+ // Watch progress barif (watchProgress > 0f && !isLocked) {LinearProgressIndicator(progress = { watchProgress.coerceIn(0f, 1f) },@@ -338,41 +336,40 @@ fun MovieCard(.align(Alignment.BottomCenter).fillMaxWidth().height(3.dp),- color = AccentCyan,+ color = Primary,trackColor = Color.Transparent)}- // Top-right badges+ // Badgesif (!isLocked) {- Row(- modifier = Modifier- .align(Alignment.TopEnd)- .padding(6.dp),- horizontalArrangement = Arrangement.spacedBy(4.dp),- verticalAlignment = Alignment.CenterVertically- ) {- if (movie.isFavorite) {- Box(- modifier = Modifier- .background(AccentAmber, RoundedCornerShape(4.dp))- .padding(horizontal = 5.dp, vertical = 2.dp)- ) {- Text("β ", style = MaterialTheme.typography.labelSmall, color = Color.Black)- }+ // Rating badge (Bottom Right above title area or overlap)+ if (movie.rating > 0f) {+ Box(+ modifier = Modifier+ .align(Alignment.TopStart)+ .padding(8.dp)+ .background(Color.Black.copy(alpha = 0.6f), RoundedCornerShape(4.dp))+ .padding(horizontal = 6.dp, vertical = 2.dp)+ ) {+ Text(+ text = "β ${String.format("%.1f", movie.rating)}",+ style = MaterialTheme.typography.labelSmall,+ color = AccentAmber+ )}- if (movie.rating > 0f) {- Box(- modifier = Modifier- .background(PrimaryGlow, RoundedCornerShape(4.dp))- .padding(horizontal = 6.dp, vertical = 2.dp)- ) {- Text(- text = String.format("%.1f", movie.rating),- style = MaterialTheme.typography.labelMedium,- color = Color.White- )- }+ }++ // Favorite badge+ if (movie.isFavorite) {+ Box(+ modifier = Modifier+ .align(Alignment.TopEnd)+ .padding(8.dp)+ .background(Color.Red.copy(alpha = 0.8f), RoundedCornerShape(4.dp))+ .padding(4.dp)+ ) {+ Text("β€", style = MaterialTheme.typography.labelSmall, color = Color.White)}}}@@ -389,27 +386,29 @@ fun SeriesCard(onLongClick: (() -> Unit)? = null,isLocked: Boolean = false,watchProgress: Float = 0f,- subtitle: String? = null, // e.g. "12 episodes" β caller provides to avoid type collision+ subtitle: String? = null,isReorderMode: Boolean = false,isDragging: Boolean = false) {- val posterUrl = series.posterUrl- val seriesName = series.name-FocusableCard(onClick = onClick,onLongClick = onLongClick,modifier = modifier,- width = 240.dp,- height = 135.dp+ width = 160.dp, // PREMIUM: Vertical aspect ratio+ height = 240.dp,+ isReorderMode = isReorderMode,+ isDragging = isDragging) { isFocused ->// Poster image- if (!posterUrl.isNullOrBlank() && !isLocked) {+ if (!series.posterUrl.isNullOrBlank() && !isLocked) {AsyncImage(- model = posterUrl,- contentDescription = seriesName,- modifier = Modifier.fillMaxSize().clip(RoundedCornerShape(10.dp)),- contentScale = ContentScale.Crop+ model = series.posterUrl,+ contentDescription = series.name,+ modifier = Modifier+ .fillMaxSize()+ .clip(RoundedCornerShape(12.dp)) // PREMIUM: Clip poster to card shape+ .background(SurfaceElevated),+ contentScale = ContentScale.Fit // PREMIUM: Fits entire poster inside card)} else {Box(@@ -418,7 +417,7 @@ fun SeriesCard() {Text(text = if (isLocked) "π" else "πΊ",- style = MaterialTheme.typography.headlineLarge+ style = MaterialTheme.typography.displayMedium)}}@@ -428,10 +427,10 @@ fun SeriesCard(modifier = Modifier.align(Alignment.BottomCenter).fillMaxWidth()- .fillMaxHeight(0.5f)+ .fillMaxHeight(0.6f).background(Brush.verticalGradient(- colors = listOf(Color.Transparent, GradientOverlayBottom)+ colors = listOf(Color.Transparent, Color.Black.copy(alpha = 0.85f)),)))@@ -441,13 +440,13 @@ fun SeriesCard(modifier = Modifier.align(Alignment.BottomStart).fillMaxWidth()- .padding(horizontal = 8.dp, vertical = 6.dp),+ .padding(12.dp),verticalArrangement = Arrangement.spacedBy(2.dp)) {Text(- text = if (isLocked) stringResource(R.string.card_locked) else seriesName,+ text = if (isLocked) stringResource(R.string.card_locked) else series.name,style = MaterialTheme.typography.titleSmall,- color = TextPrimary,+ color = Color.White,maxLines = 2,overflow = TextOverflow.Ellipsis)@@ -455,13 +454,13 @@ fun SeriesCard(Text(text = subtitle,style = MaterialTheme.typography.labelMedium,- color = TextTertiary,+ color = Color.White.copy(alpha = 0.7f),maxLines = 1)}}- // Watch progress bar at very bottom edge+ // Watch progress barif (watchProgress > 0f && !isLocked) {LinearProgressIndicator(progress = { watchProgress.coerceIn(0f, 1f) },@@ -469,21 +468,41 @@ fun SeriesCard(.align(Alignment.BottomCenter).fillMaxWidth().height(3.dp),- color = AccentCyan,+ color = Primary,trackColor = Color.Transparent)}- // Top-right badges- if (series.isFavorite && !isLocked) {- Box(- modifier = Modifier- .align(Alignment.TopEnd)- .padding(6.dp)- .background(AccentAmber, RoundedCornerShape(4.dp))- .padding(horizontal = 5.dp, vertical = 2.dp)- ) {- Text("β ", style = MaterialTheme.typography.labelSmall, color = Color.Black)+ // Badges+ if (!isLocked) {+ // Rating badge+ if (series.rating > 0f) {+ Box(+ modifier = Modifier+ .align(Alignment.TopStart)+ .padding(8.dp)+ .background(Color.Black.copy(alpha = 0.6f), RoundedCornerShape(4.dp))+ .padding(horizontal = 6.dp, vertical = 2.dp)+ ) {+ Text(+ text = "β ${String.format("%.1f", series.rating)}",+ style = MaterialTheme.typography.labelSmall,+ color = AccentAmber+ )+ }+ }++ // Favorite badge+ if (series.isFavorite) {+ Box(+ modifier = Modifier+ .align(Alignment.TopEnd)+ .padding(8.dp)+ .background(Color.Red.copy(alpha = 0.8f), RoundedCornerShape(4.dp))+ .padding(4.dp)+ ) {+ Text("β€", style = MaterialTheme.typography.labelSmall, color = Color.White)+ }}}}diff --git a/app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesScreen.kt b/app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesScreen.ktindex 7833bed6..938c31c3 100644--- a/app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesScreen.kt+++ b/app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesScreen.kt@@ -104,9 +104,9 @@ fun MoviesScreen(items(3) {SkeletonRow(modifier = Modifier.fillMaxWidth(),- cardWidth = 240,- cardHeight = 135,- itemsCount = 4+ cardWidth = 160,+ cardHeight = 240,+ itemsCount = 5)}}@@ -343,7 +343,7 @@ fun MoviesScreen(}LazyVerticalGrid(- columns = GridCells.Adaptive(minSize = 240.dp),+ columns = GridCells.Adaptive(minSize = 160.dp),modifier = Modifier.fillMaxSize().weight(1f)diff --git a/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt b/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.ktindex 0e69b04e..221b2f38 100644--- a/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt+++ b/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt@@ -210,16 +210,8 @@ fun ProviderSetupScreen(label = stringResource(R.string.setup_m3u_hint))} else {- TvTextField(- value = if (m3uUrl.startsWith("file://")) m3uUrl.substringAfterLast("/") else m3uUrl,- onValueChange = { /* read only */ },- label = "Selected File",- modifier = Modifier.clickable { filePickerLauncher.launch(arrayOf("*/*")) }- )-- ActionButton(- text = "Select Local File",- enabled = !uiState.isLoading,+ FileSelectorCard(+ fileName = if (m3uUrl.startsWith("file://")) m3uUrl.substringAfterLast("/") else null,onClick = { filePickerLauncher.launch(arrayOf("*/*")) })}@@ -371,6 +363,66 @@ private fun ActionButton(}}+@Composable+private fun FileSelectorCard(+ fileName: String?,+ onClick: () -> Unit+) {+ var isFocused by remember { mutableStateOf(false) }++ val borderColor = if (isFocused) Primary else SurfaceHighlight+ val bgColor = if (isFocused) Surface else SurfaceElevated+ val borderWidth = if (isFocused) 2.dp else 1.dp++ Surface(+ onClick = onClick,+ modifier = Modifier+ .fillMaxWidth()+ .height(80.dp)+ .onFocusChanged { isFocused = it.isFocused },+ shape = ClickableSurfaceDefaults.shape(RoundedCornerShape(12.dp)),+ border = ClickableSurfaceDefaults.border(+ border = Border(BorderStroke(borderWidth, borderColor)),+ focusedBorder = Border(BorderStroke(borderWidth, borderColor))+ ),+ colors = ClickableSurfaceDefaults.colors(+ containerColor = bgColor,+ focusedContainerColor = bgColor+ )+ ) {+ Column(+ modifier = Modifier.fillMaxSize().padding(16.dp),+ verticalArrangement = Arrangement.Center,+ horizontalAlignment = Alignment.CenterHorizontally+ ) {+ if (fileName != null) {+ Text(+ text = fileName,+ style = MaterialTheme.typography.bodyLarge,+ color = OnBackground,+ textAlign = TextAlign.Center+ )+ Text(+ text = "Click to change file",+ style = MaterialTheme.typography.bodySmall,+ color = OnSurfaceDim+ )+ } else {+ Text(+ text = "Select M3U File",+ style = MaterialTheme.typography.bodyLarge,+ color = OnSurfaceDim+ )+ Text(+ text = "Browse local storage",+ style = MaterialTheme.typography.bodySmall,+ color = OnSurfaceDim+ )+ }+ }+ }+}+@Composableprivate fun TabButton(text: String,diff --git a/app/src/main/java/com/streamvault/app/ui/screens/series/SeriesScreen.kt b/app/src/main/java/com/streamvault/app/ui/screens/series/SeriesScreen.ktindex 3663c2ab..84767397 100644--- a/app/src/main/java/com/streamvault/app/ui/screens/series/SeriesScreen.kt+++ b/app/src/main/java/com/streamvault/app/ui/screens/series/SeriesScreen.kt@@ -101,9 +101,9 @@ fun SeriesScreen(items(3) {SkeletonRow(modifier = Modifier.fillMaxWidth(),- cardWidth = 240,- cardHeight = 135,- itemsCount = 4+ cardWidth = 160,+ cardHeight = 240,+ itemsCount = 5)}}@@ -331,7 +331,7 @@ fun SeriesScreen(}LazyVerticalGrid(- columns = GridCells.Adaptive(minSize = 240.dp),+ columns = GridCells.Adaptive(minSize = 160.dp),modifier = Modifier.fillMaxSize().onPreviewKeyEvent { event ->diff --git a/app/src/main/res/drawable/app_banner.png b/app/src/main/res/drawable/app_banner.pngnew file mode 100644index 00000000..a8680f2fBinary files /dev/null and b/app/src/main/res/drawable/app_banner.png differdiff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_vault.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_vault.pngnew file mode 100644index 00000000..fac722dbBinary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_vault.png differdiff --git a/build_output.txt b/build_output.txtindex e26e49fc..56491e3f 100644Binary files a/build_output.txt and b/build_output.txt differ