Hello All, I'm having trouble converting the follo...
# announcements
i
Hello All, I'm having trouble converting the following java code into kotlin. Can I get your input? The Java code:
Copy code
if (hiddenView.getVisibility() == View.VISIBLE) {
     TransitionManager.beginDelayedTransition(cardView, new AutoTransition());
     hiddenView.setVisibility(View.GONE);
                   
}
My code:
Copy code
if (hiddenView.isVisible) {
     TransitionManager.beginDelayedTransition(cardView, AutoTransition())
     hiddenView.visibility = it.GONE
}
a
should be
View.GONE
instead of
it.GONE
i
thank you!
l
You can also write
hiddenView.isVisible = false
or
hiddenView.isGone = true