Add ripple indication

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-08-24 23:15:33 +05:30
parent bfdc4b3183
commit 15d8f61e97
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -1,11 +1,13 @@
package dev.msfjarvis.todo.ui
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyItemScope
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Card
import androidx.compose.material.ripple.RippleIndication
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextStyle
@ -17,7 +19,9 @@ import dev.msfjarvis.todo.data.TodoItem
@Composable
fun LazyItemScope.TodoRowItem(item: TodoItem) {
Row(
modifier = Modifier.padding(vertical = 8.dp).fillParentMaxWidth(),
modifier = Modifier.padding(vertical = 8.dp)
.fillParentMaxWidth()
.clickable(onClick = {}, indication = RippleIndication()),
) {
Card(
shape = RoundedCornerShape(8.dp),