There is a class that has nothing to do with MainActivity, but there are actions in it that should change the title of the Action bar.
Tell me how best to implement?

    1 answer 1

    1. Create an interface.
    2. Implement it in activit.
    3. In the implementation, set the toolbar header.
    4. Pass the link to the activit / interface to your class.
    5. At the right time, call the interface method.