title: Different types of Listeners in Android
body: <p>I have an Activity which contains TextViews, Spinners, TimePickers, etc. and I would like to perform a task only when the button OK is clicked. For that, I set a listener on each component. My problem is : there are a few types of listeners that I use (onClickListener, onItemSelectedListener, etc.) so each listener needs his own method (onClickListener needs the method <code>public void onClick(View v){};</code> onItemSelectedListener needs the method <code>public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) {}</code>) but I would like to perform one task with all these information only once (when the button OK is pressed) so this should be declared in the onClick() method. But how can I manage the other values if it has to be managed each time in a different method than the one who needs it?</p>