Skip to content

Commit 3bfc4a7

Browse files
committedJul 2, 2020
Fix shadow and ripple on Popular cards.
Change-Id: Id256da2041e7132b80f6f5b7501fcf569127adb6
1 parent 1accb58 commit 3bfc4a7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

Diff for: ‎JetNews/app/src/main/java/com/example/jetnews/ui/home/HomeScreen.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ private fun HomeScreenPopularSection(
264264
style = MaterialTheme.typography.subtitle1
265265
)
266266
}
267-
HorizontalScroller(modifier = Modifier.padding(end = 16.dp, bottom = 16.dp)) {
267+
HorizontalScroller(modifier = Modifier.padding(end = 16.dp)) {
268268
posts.forEach { post ->
269-
PostCardPopular(post, navigateTo, Modifier.padding(start = 16.dp))
269+
PostCardPopular(post, navigateTo, Modifier.padding(start = 16.dp, bottom = 16.dp))
270270
}
271271
}
272272
HomeScreenDivider()

Diff for: ‎JetNews/app/src/main/java/com/example/jetnews/ui/home/PostCardYourNetwork.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ fun PostCardPopular(
5151
Card(
5252
shape = MaterialTheme.shapes.medium,
5353
modifier = modifier.preferredSize(280.dp, 240.dp)
54-
.clickable(onClick = { navigateTo(Screen.Article(post.id)) })
5554
) {
56-
Column {
55+
Column(modifier = Modifier.clickable(onClick = { navigateTo(Screen.Article(post.id)) })) {
5756
val image = post.image ?: imageResource(R.drawable.placeholder_4_3)
5857
Image(
5958
asset = image,

0 commit comments

Comments
 (0)
Please sign in to comment.