small ui tweaks on details page

This commit is contained in:
Owen LeJeune
2022-11-16 15:48:52 -05:00
parent 60a5600cb0
commit 8d7800ce48
2 changed files with 15 additions and 15 deletions

View File

@@ -41,7 +41,7 @@ fun ContentCard(
Text(
text = title,
style = MaterialTheme.typography.titleLarge,
modifier = Modifier.padding(start = 12.dp, top = 8.dp),
modifier = Modifier.padding(start = 16.dp, top = 8.dp),
color = textColor
)
}
@@ -146,7 +146,7 @@ fun ListContentCard(
Column(
modifier = Modifier
.fillMaxWidth()
.padding(12.dp),
.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
header?.invoke()

View File

@@ -319,7 +319,7 @@ private fun RateButton(
Box(
modifier = modifier
.animateContentSize(tween(durationMillis = 300))
.animateContentSize(tween(durationMillis = 100))
.clip(CircleShape)
.height(40.dp)
.requiredWidthIn(min = 40.dp)
@@ -391,7 +391,6 @@ fun WatchlistButton(
Box(
modifier = modifier
.animateContentSize(tween(durationMillis = 300))
.clip(CircleShape)
.height(40.dp)
.requiredWidthIn(min = 40.dp)
@@ -405,7 +404,7 @@ fun WatchlistButton(
coroutineScope.launch {
tintColor.animateTo(
targetValue = if (added) filledColor else bgColor,
animationSpec = tween(300)
animationSpec = tween(200)
)
}
}
@@ -489,7 +488,6 @@ fun FavoriteButton(
Box(
modifier = modifier
.animateContentSize(tween(durationMillis = 300))
.clip(CircleShape)
.height(40.dp)
.requiredWidthIn(min = 40.dp)
@@ -503,7 +501,7 @@ fun FavoriteButton(
coroutineScope.launch {
tintColor.animateTo(
targetValue = if (added) filledColor else bgColor,
animationSpec = tween(300)
animationSpec = tween(200)
)
}
}
@@ -842,9 +840,10 @@ private fun CastCard(itemId: Int?, service: DetailService, appNavController: Nav
backgroundColor = MaterialTheme.colorScheme.primary,
textColor = MaterialTheme.colorScheme.background
) {
LazyRow(modifier = Modifier
LazyRow(
modifier = Modifier
.fillMaxWidth()
.padding(12.dp),
.padding(16.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp)
) {
items(castAndCrew.value?.cast?.size ?: 0) { i ->
@@ -898,10 +897,11 @@ fun SimilarContentCard(
modifier = modifier,
title = stringResource(id = R.string.recommended_label)
) {
LazyRow(modifier = Modifier
LazyRow(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()
.padding(12.dp),
.padding(16.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp)
) {
items(similarContent.value?.results?.size ?: 0) { i ->
@@ -1124,7 +1124,7 @@ private fun ReviewsCard(
}
Divider(
color = MaterialTheme.colorScheme.secondary,
modifier = Modifier.padding(horizontal = 50.dp, vertical = 6.dp)
modifier = Modifier.padding(vertical = 12.dp)
)
}
} else {