[feat] Beautify the interface, title bar in full screen mode

This commit is contained in:
acite
2025-08-27 03:56:26 +08:00
parent 76054da910
commit b5940aecc3

View File

@@ -488,7 +488,13 @@ fun PortalCorePlayer(modifier: Modifier, videoPlayerViewModel: VideoPlayerViewMo
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 2.dp)
.align(Alignment.BottomCenter),
.align(Alignment.BottomCenter).background(
brush = Brush.verticalGradient(
colors = listOf(
Color.Transparent,
Color.Black.copy(alpha = 0.4f),
)
)),
horizontalArrangement = Arrangement.SpaceBetween,
) {
IconButton(
@@ -1058,21 +1064,50 @@ fun VideoPlayerLandscape(videoPlayerViewModel: VideoPlayerViewModel)
}
}
AnimatedVisibility(
visible = videoPlayerViewModel.planeVisibility,
enter = slideInVertically(initialOffsetY = { fullHeight -> -fullHeight }),
exit = slideOutVertically(targetOffsetY = { fullHeight -> -fullHeight }),
modifier = Modifier
.align(Alignment.TopCenter)
.fillMaxWidth()
)
{
Row(Modifier
.align(Alignment.TopStart)
.padding(horizontal = 32.dp).background(
brush = Brush.verticalGradient(
colors = listOf(
Color.Black.copy(alpha = 0.4f),
Color.Transparent,
)
)))
{
IconButton(
onClick = {
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
},
modifier = Modifier
.align(Alignment.TopStart)
.padding(8.dp)
modifier = Modifier.size(36.dp).align(Alignment.CenterVertically)
) {
Icon(
modifier = Modifier.size(36.dp),
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Back",
tint = Color.White
)
}
Text(
text = "${videoPlayerViewModel.video?.video?.name}",
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(horizontal = 12.dp).align(Alignment.CenterVertically),
fontSize = 18.sp
)
}
}
AnimatedVisibility(
visible = videoPlayerViewModel.planeVisibility,
enter = slideInVertically(initialOffsetY = { fullHeight -> fullHeight }),