我在我的Activity中有很多按钮,我有以下几个问题:
Should I create multiple inner anonymous classes for OnClickListeners for each button, like below:
private View.OnClickListener mShuffleListener = new View.OnClickListener() { public void onClick(View v) { /// task to do } };
Or should I go for a named inner class and add an if condition to check which click listener was called.