Hi, In xml we use `View.INVISIBLE` to just don't s...
# compose
k
Hi, In xml we use
View.INVISIBLE
to just don't show the view at all, but it still takes up space for layout purposes. What is the alternative in jetpack compose?
Copy code
AnimatedVisibility(
    // true or false
) {
    Button() // button code.
}
j
First thing that comes to my mind is using the
graphicsLayer
modifier with alpha 0.
s
Altering only the graphicsLayer alpha may mean that it’s still interactable and does stuff though right? It may not be what you want in some cases, to be careful to also disable such touch inputs.
k
Sure, I'll take care of that. Thanks for gudiance
s
Depends what you're trying to do. Placeholder from accompanist might be what you want https://github.com/google/accompanist
k
@Sean Proctor what should I use with accompanist ?
s
Placeholder