Just started working with Android and immediately came across the problem: how to manage UI elements from other classes?
Example, I have a class (in fact, a stupid switch), which, depending on the data coming in, must perform various actions (add an item to the ListView, issue a notification, etc.) how to make it possible to manage the activity elements out of it, and is it wise?
If not, please tell me which method to work with the interface.