AmrJyniat
09/09/2022, 10:47 AMAnimatedVisibility
disable/ignore the padding of its children?
AnimatedVisibility(visible = isExpanded) {
Divider(
modifier = Modifier.padding(bottom = 12.dp).fillMaxWidth(),
color = Gray200,
thickness = 2.dp
)
OutlinedButton(
modifier = Modifier.padding(top = 12.dp),
onClick = {}
){}
}
The padding of both divider and button has no effect when wrapping them within AV, but when I comment AV out the padding works well, am I missing anything?lesincs
09/12/2022, 1:55 PMModifier.padding(bottom = 12.dp)
for Divider
is not working? If so I found that both start
end
top
are working except bottom
, and if you wrap the Divider
and Button
into a Column
, it will be working as well, so I guess the reason should be the Layout
inside AnimatedVisibility
does not care bottom padding.