So I have two buttons, Left and Right. Both have same
setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
}
methods inside it but I want my code reduced, so is there a possibility I can just make the Left Button call the onClick method of Right Button? instead of having duplicate methods.
Declare the onclick as a private instance variable of your class: