What do we call the thing inside the parenthesis i.e., "new AdpaterView"
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { switch (position) { case 0: constraintLayout.setBackgroundColor(Color.parseColor("#0091EA")); break; case 1: constraintLayout.setBackgroundColor(Color.parseColor("#5CF89D")); break; case 2: constraintLayout.setBackgroundColor(Color.parseColor("#FFEC87")); break; case 3: constraintLayout.setBackgroundColor(Color.parseColor("#F9A86C")); break; case 4: constraintLayout.setBackgroundColor(Color.parseColor("#C39AFC")); ... https://code.sololearn.com/cBRg0hUDmrFE/?ref=app