Skip to content

Commit

Permalink
fix: Make the text size fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
PolinaPolupan committed Dec 20, 2024
1 parent 679815a commit c1505fe
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private fun TrackDescription(
modifier: Modifier = Modifier,
onAlbumClick: (String) -> Unit
) {
Column(modifier = modifier) {
Column(modifier = modifier.fillMaxWidth(.85f)) {
Text(
text = trackName,
color = MaterialTheme.colorScheme.onSurface,
Expand Down Expand Up @@ -387,6 +387,26 @@ fun TrackPlayerPreview() {
}
}

@RequiresApi(Build.VERSION_CODES.O)
@Preview
@Composable
fun TrackPlayerLongTextPreview() {
MyMusicTheme {
TrackPlayer(
albumId = "0",
trackName = "Long Long Long Long Long Long Long name",
artistName = "Long Long Long Long Long Long Long Long Long Long Long name",
trackDuration = Duration.ZERO,
onPlayClick = {},
onSkipPreviousClick = {},
onSkipNextClick = {},
onAddToPlaylistClick = {},
onNavigateToAlbum = {},
onAlbumClick = {}
)
}
}

@Preview
@Composable
fun TopAppBarPreview() {
Expand Down

0 comments on commit c1505fe

Please sign in to comment.