I am working on google maps api, in which on map screen i want to give an option for a user to select map type through spinner. The return type of map option is integer so i am giving that value to spinner for selection through Integer Array. My code snippet is given below:
private GoogleMap mMap;
int normMap = mMap.MAP_TYPE_NORMAL;
int satelliteMap =mMap.MAP_TYPE_SATELLITE;
int terrainMap =mMap.MAP_TYPE_TERRAIN;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_location_demo);
spinnerOsversions = (Spinner) findViewById(R.id.spinner1);
ArrayAdapter<Integer> adapter_state = new ArrayAdapter<Integer>(this,
android.R.layout.simple_spinner_item, mapOptions);
//Here it shows an error that Integer should not be passed to it, want to send my mapType int array list to it
adapter_state.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinnerOsversions.setAdapter(adapter_state);
spinnerOsversions.setOnItemSelectedListener(this);
}