Where to set all Listeners for the user interfaces?
Is it good practice to set them in onCreate? This looks so unstructured and strange.
Is
This might be what you want to avoid a mess
public class SomeActivity extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState){
Button button1 = (Button)findViewById(R.id.button1);
button1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View view){
SomeActivity.this.button1_onClick(view);
}
});
}
private void button1_onClick(View view){
///do stubs here
}
}