I am working on the Layout of my main activity with Android Studio (lowest API is 15), and have defined a few XML Buttons on it.
The idea of the program is to edit a list of words by adding to, displaying, and clearing it with a set of buttons. (There is an EditText for adding, but that's not important for the question). But with the idea of high cohesion in mind, I have defined this list and the methods that manipulate it in another plain class called WordList (which still extends Activity), and so when trying to invoke the onClick property of a button, it cannot find them.
android:onClick="addWord"
Method 'addWord' is missing in 'MainActivity' or has incorrect signature...
Is there a way to make the layout, or the individual element point (or get its data context) from another class, or is that against the whole structure of Android and I should just put it in its original activity?