I'm programming on Android and I want an easy way to do the things below without having to have a bunch of overrides and ugly code:
These are all examples:
- When editText1 is changed I want a TextView to be updated with copy of what the user typed Same thing for editText2 up to editText10.
- When editText11 is changed I want to multiply the number in it by 10 and put it In some TextView.
- When editText12 becomes 0 I want some LinearLayouts to hide
Basically I want to be able to easily set up a listener and modify what kind of method the listener will trigger, without having a bunch of anonymous inner classes and other nasty stuff. Having many derivatives that each do their own predefined thing is OK, but I want to avoid repeating code and make it utilize polymorphism.
I tried really hard using interfaces, abstract methods, and other similar techniques but it just made my head go crazy.