1

ArrayAdapter constantly raising errors with spinner

view story
linux-howto

http://stackoverflow.com – My code: public class SpeedZonesFragment extends Fragment implements OnItemSelectedListener { Spinner spinner; ... // Declaring onCreate and so on spinner = (Spinner) view.findViewById(R.id.chosen_zone); ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(MainActivity.this, R.array.speed_zones, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() // the program continue (HowTos)