Chethan
12/24/2020, 9:14 AMConstraintLayout(modifier = Modifier.fillMaxWidth()) {
val (dot, title, deleteButton) = createRefs()
Image(
asset = vectorResource(id = if (!notifications.readFlag) R.drawable.ic_ellipse_red else R.drawable.ic_ellipse_white),
modifier = Modifier
.constrainAs(dot) {
linkTo(
start = parent.start,
end = title.start
)
centerVerticallyTo(parent)
}
)
Text(
text = notifications.title,
style = TextStyle(
color = black33,
fontSize = 14.sp,
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Start
),
modifier = Modifier.fillMaxWidth(0.9F).constrainAs(title) {
linkTo(
start = dot.end,
end = deleteButton.start
)
}.padding(start = 10.dp)
)
Image(
asset = vectorResource(id = R.drawable.ic_icon_delete_gray),
modifier = Modifier.wrapContentSize()
.clickable(
onClick = {
showPopUpToDelete.value = true
}
).constrainAs(deleteButton) {
end.linkTo(parent.end)
linkTo(
start = title.end,
end = parent.end
)
}
)
}
This is how presently lookingChethan
12/24/2020, 9:21 AMrsktash
12/24/2020, 9:24 AMrsktash
12/24/2020, 9:25 AMChethan
12/24/2020, 9:28 AMrsktash
12/24/2020, 9:31 AMChethan
12/24/2020, 9:32 AMChethan
12/24/2020, 9:33 AMRow {
Image(
asset = vectorResource(id = if (!notifications.readFlag) R.drawable.ic_ellipse_red else R.drawable.ic_ellipse_white),
modifier = Modifier.wrapContentSize()
)
Text(
text = notifications.title,
style = TextStyle(
color = black33,
fontSize = 14.sp,
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Start
),
modifier = Modifier.weight(1F).padding(start = 10.dp)
)
Image(
asset = vectorResource(id = R.drawable.ic_icon_delete_gray),
modifier = Modifier.wrapContentSize()
.clickable(
onClick = {
showPopUpToDelete.value = true
}
)
)
}
Chethan
12/24/2020, 9:34 AMChethan
12/24/2020, 10:00 AM