How can I change the visibility of a button in a fragment, from another fragment, in kotlin? | Sololearn: Learn to code for FREE!

0

How can I change the visibility of a button in a fragment, from another fragment, in kotlin?

5/3/2020 7:16:41 AM

Ali

2 Answers

New Answer

+1

You can use setBackground with the value Color.transparent

0

Well, you cannot control one fragment from another but you can put data by using intent put extra and to change visibility u can do view.button.visibility = View.GONE Or view.button.visibility = View.INVISIBLE