IDK Why but you can't use switch for id.
if (id == R.id.convertButton){ // do something }else if (id == R.id.convertButton2) { // do something }