Skip to content

Commit

Permalink
Audio item design lift
Browse files Browse the repository at this point in the history
  • Loading branch information
alashow committed Jul 23, 2021
1 parent 71fea2a commit eb8016a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fun ImageWithPlaceholder(
@Composable
fun CoverImage(
painter: LoadPainter<Any>,
size: Dp = 50.dp,
size: Dp = 48.dp,
backgroundColor: Color = MaterialTheme.colors.surface,
shape: Shape = MaterialTheme.shapes.small,
icon: VectorPainter = rememberVectorPainter(Icons.Default.MusicNote),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import com.google.accompanist.coil.rememberCoilPainter
import com.google.accompanist.placeholder.PlaceholderHighlight
import com.google.accompanist.placeholder.material.placeholder
Expand All @@ -51,6 +52,7 @@ fun AudioRow(

Row(
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
.clickable {
if (!isPlaceholder)
Expand Down Expand Up @@ -101,6 +103,7 @@ fun AudioRowItem(
)
Row(
horizontalArrangement = Arrangement.spacedBy(AppTheme.specs.padding),
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
) {
val image = rememberCoilPainter(audio.coverUrlSmall ?: audio.coverUrl, fadeIn = true)
Expand All @@ -112,7 +115,7 @@ fun AudioRowItem(
)
}

Column(verticalArrangement = Arrangement.spacedBy(AppTheme.specs.paddingSmall)) {
Column(verticalArrangement = Arrangement.spacedBy(if (isPlaceholder) AppTheme.specs.paddingTiny else 0.dp)) {
Text(
audio.title,
style = MaterialTheme.typography.body1,
Expand Down

0 comments on commit eb8016a

Please sign in to comment.