Hi I am working on an application which creates dynamic components like buttons etc. When a certain condition occurs, I want to remove or empty my layout.. Can anyone guide or suggest me?
Use the function removeAllViews() on your layout.
All of the Layout classes are children of ViewGroup so you can use the ViewGroup.removeAllViews() method
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With