This tutorial: Android Spinners indicates that you can use the following code to install a Spinner array based on a resource:
ArrayAdapter<CharSequence> dataAdapter = ArrayAdapter.createFromResource(this, R.array.string-array-id, android.R.layout.simple_spinner_item); dataAdapter .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter);
Using the createFromResource() method instead of new and providing the resource identifier of your array should provide the intended result. See the manual for more details.
source share