Call a listener from another class
<p>In my android project's main class i've got about six listener, with this structure:</p>

<pre><code>temp.addTextChangedListener(new TextWatcher() {

            public void afterTextChanged(Editable arg0) {

            }

            public void beforeTextChanged(CharSequence s, int arg1, int arg2, int arg3) { }
            public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }

        });
</code></pre>

<p>But it's a bit disorganized... the goal i'd like to do, is create a general class, called, for example, TextBox, which contains all its listeners. Same thing for the buttons, with its listeners.
Do you understand? How can I do this?</p>

<p>With this system I can call a method in this way:</p>

<pre><code>temp.addTextChangedListener(TextBox.temp())
test.addTextChangedListener(TextBox.test())
</code></pre>

<p>If I've explained myself badly just tell me.
Thanks.</p>
