Skip to content

Instantly share code, notes, and snippets.

@rubenquadros
Created July 31, 2022 14:11
Show Gist options
  • Save rubenquadros/dee533b6009e941e8741bba658bc16ce to your computer and use it in GitHub Desktop.
Save rubenquadros/dee533b6009e941e8741bba658bc16ce to your computer and use it in GitHub Desktop.
Bottom controls UI
@Composable
fun BottomControls(modifier: Modifier = Modifier) {
Column(modifier = modifier.padding(bottom = 32.dp)) {
// seek bar
Slider(
modifier = Modifier.fillMaxWidth(),
value = 1f,
onValueChange = { value: Float -> },
valueRange = 0f..1f,
colors =
SliderDefaults.colors(
thumbColor = Purple200,
activeTickColor = Purple200
)
)
Row(
modifier = Modifier.fillMaxWidth().padding(top = 16.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
// show total video time
Text(
modifier = Modifier.padding(horizontal = 16.dp),
text = "Total video duration",
color = Purple200
)
// full screen toggle button
IconButton(
modifier = Modifier.padding(horizontal = 16.dp),
onClick = {}
) {
Image(
contentScale = ContentScale.Crop,
painter = painterResource(id = R.drawable.ic_fullscreen),
contentDescription = "Enter/Exit fullscreen"
)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment