mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
join play and shuffle into one split pill
This commit is contained in:
@@ -22,6 +22,7 @@ import androidx.compose.foundation.layout.width
|
|||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.LazyListScope
|
import androidx.compose.foundation.lazy.LazyListScope
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.rounded.ArrowBack
|
import androidx.compose.material.icons.automirrored.rounded.ArrowBack
|
||||||
import androidx.compose.material.icons.rounded.Download
|
import androidx.compose.material.icons.rounded.Download
|
||||||
@@ -261,22 +262,34 @@ fun HeroHeader(
|
|||||||
}
|
}
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally),
|
horizontalArrangement = Arrangement.Center,
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
FilledIconButton(
|
Box(contentAlignment = Alignment.Center) {
|
||||||
onClick = onPlay,
|
Row {
|
||||||
enabled = hasSongs,
|
FilledIconButton(
|
||||||
modifier = Modifier.width(76.dp).height(48.dp),
|
onClick = onPlay,
|
||||||
) {
|
enabled = hasSongs,
|
||||||
Icon(Icons.Rounded.PlayArrow, contentDescription = "Play", modifier = Modifier.size(30.dp))
|
shape = RoundedCornerShape(topStart = 24.dp, bottomStart = 24.dp),
|
||||||
}
|
modifier = Modifier.width(56.dp).height(48.dp),
|
||||||
FilledIconButton(
|
) {
|
||||||
onClick = onShuffle,
|
Icon(Icons.Rounded.PlayArrow, contentDescription = "Play", modifier = Modifier.size(30.dp))
|
||||||
enabled = hasSongs,
|
}
|
||||||
modifier = Modifier.width(76.dp).height(48.dp),
|
FilledIconButton(
|
||||||
) {
|
onClick = onShuffle,
|
||||||
Icon(Icons.Rounded.Shuffle, contentDescription = "Shuffle play", modifier = Modifier.size(30.dp))
|
enabled = hasSongs,
|
||||||
|
shape = RoundedCornerShape(topEnd = 24.dp, bottomEnd = 24.dp),
|
||||||
|
modifier = Modifier.width(56.dp).height(48.dp),
|
||||||
|
) {
|
||||||
|
Icon(Icons.Rounded.Shuffle, contentDescription = "Shuffle play", modifier = Modifier.size(30.dp))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Box(
|
||||||
|
Modifier
|
||||||
|
.width(1.dp)
|
||||||
|
.height(20.dp)
|
||||||
|
.background(MaterialTheme.colorScheme.onPrimary.copy(alpha = 0.35f)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IconButton(onClick = onMore, modifier = Modifier.padding(horizontal = 8.dp)) {
|
IconButton(onClick = onMore, modifier = Modifier.padding(horizontal = 8.dp)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user