You must extract your data from the file:
String[] testArray = getResources().getStringArray(R.array.testArray);
Then you need to inflate the counter:
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(
this, android.R.layout.simple_spinner_item, testArray );
mySpinner.setAdapter(spinnerArrayAdapter);
Shudy source
share