Is this generally a good practice to adopt?
I am working through the tutorials and got to the part where button listeners are being implemented:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz);
mTrueButton = (Button) findViewById(R.id.true_button);
//and here is the anonymous inner class
mTrueButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
Am I better off learning this style or is there another way I should be learning this for the sake of good practice? It seems a little counter to my basic understanding of OOP where things seem to be... separated and modularized, if that makes sense.