mavavilj
Lurker
Where's the best place to implement listener methods?
In one example I found, they're done inside the onCreate() method of the MainActivity class.
But intuitively it seems that this will lead to quite bloated code, when one has many views and many UI elements.
When I was writing C++ or Java GUIs before I used to inherit from the GUI element classes that I used as GUI elements and then implement the methods inside them. That made every GUI element have its own encapsulation.
In one example I found, they're done inside the onCreate() method of the MainActivity class.
But intuitively it seems that this will lead to quite bloated code, when one has many views and many UI elements.
When I was writing C++ or Java GUIs before I used to inherit from the GUI element classes that I used as GUI elements and then implement the methods inside them. That made every GUI element have its own encapsulation.
Last edited: