Say I have 4 buttons and I want each one to do a different thing. I don't want a big switch statement where I do a different thing based on which button was pushed, nor do I want a separate method for each button click. Is command pattern a good way to solve this?
- The difference between Builder Design pattern and Factory Design pattern?
- Android: ListView elements with multiple clickable buttons
- C++ – How to implement the factory method pattern in C++ correctly
- Android – How to handle button clicks using the XML onClick within Fragments