I fixed it guys thanks for the comments about Id changes leads me to the answer
if (AD == 1){
spinner1 = (Spinner)findViewById(R.id.spinner);//this line fixed it
spinner1.getSelectedView();
spinner1.setEnabled(false);
}