0
First you need to convert R.drawable to String, then assign them to imagePath.
Example
spTypePets.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Resourc...