Thread
#compose
    david.bilik

    david.bilik

    2 years ago
    👋 hi, I’m playing with JetNews sample and I was curious why the Ripple of simple Story item is not side-to-side of the screen and also why click events are not triggered when clicked on side but I cant see why is that in the code. There is no padding on the screen, the row looks like
    @Composable
    fun PostCardSimple(post: Post) {
        Ripple(bounded = true) {
            Clickable(onClick = {
                navigateTo(Screen.Article(post.id))
            }) {
                Row(modifier = Spacing(16.dp)) {
                    PostImage(modifier = Spacing(right = 16.dp), post = post)
                    Column(modifier = Flexible(1f)) {
                        PostTitle(post)
                        AuthorAndReadTime(post)
                    }
                    BookmarkButton(
                        isBookmarked = isFavorite(postId = post.id),
                        onBookmark = { toggleBookmark(postId = post.id) }
                    )
                }
            }
        }
    }
    and the padding is controled via
    Spacing
    modifier of the
    Row
    . Is it possible that both
    Ripple
    and
    Clickable
    react only for inner elements and ignores padding around them?
    Andrey Kulikov

    Andrey Kulikov

    2 years ago
    Yes, Ripple and Clickable are applied for the inner Layout. Which is in this example the Row after applying the spacing. We are still exploring how this will work in the end