[feat] Beautify the interface, title bar in full screen mode
This commit is contained in:
@@ -488,7 +488,13 @@ fun PortalCorePlayer(modifier: Modifier, videoPlayerViewModel: VideoPlayerViewMo
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(horizontal = 2.dp)
|
.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,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
) {
|
) {
|
||||||
IconButton(
|
IconButton(
|
||||||
@@ -1058,21 +1064,50 @@ fun VideoPlayerLandscape(videoPlayerViewModel: VideoPlayerViewModel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IconButton(
|
AnimatedVisibility(
|
||||||
onClick = {
|
visible = videoPlayerViewModel.planeVisibility,
|
||||||
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
enter = slideInVertically(initialOffsetY = { fullHeight -> -fullHeight }),
|
||||||
},
|
exit = slideOutVertically(targetOffsetY = { fullHeight -> -fullHeight }),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
.align(Alignment.TopCenter)
|
||||||
|
.fillMaxWidth()
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Row(Modifier
|
||||||
.align(Alignment.TopStart)
|
.align(Alignment.TopStart)
|
||||||
.padding(8.dp)
|
.padding(horizontal = 32.dp).background(
|
||||||
) {
|
brush = Brush.verticalGradient(
|
||||||
Icon(
|
colors = listOf(
|
||||||
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
|
Color.Black.copy(alpha = 0.4f),
|
||||||
contentDescription = "Back",
|
Color.Transparent,
|
||||||
tint = Color.White
|
)
|
||||||
)
|
)))
|
||||||
|
{
|
||||||
|
IconButton(
|
||||||
|
onClick = {
|
||||||
|
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||||
|
},
|
||||||
|
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(
|
AnimatedVisibility(
|
||||||
visible = videoPlayerViewModel.planeVisibility,
|
visible = videoPlayerViewModel.planeVisibility,
|
||||||
enter = slideInVertically(initialOffsetY = { fullHeight -> fullHeight }),
|
enter = slideInVertically(initialOffsetY = { fullHeight -> fullHeight }),
|
||||||
|
|||||||
Reference in New Issue
Block a user