I want to use existing onClick method to make my program simpler. It consists of onClick method and other method:
@Override
public void onClick(View v) {
switch(v.getId()){
case R.id.button1:
....
break;
}
}
void foo(){
....
onClick(????);
}
Is there any way to make it do the same behaviour like when i click it on the phone?