I have a custom spinner which is replacing my default spinner which was populated by hard coded values in my strings xml.
I have used my custom spinner and populated it dynamically in java but i don't need to do this for this one.
Do i have to populate a list then add it to the spinner in java? and if so how do i populate a list from strings.xml array element?
List<String> spinnerList = new ArrayList<String>();
//spinnerList.addAll(R.array.array_spinner);error here, doesnt like this?????????????
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,R.layout.spinner_custom, spinnerList);
spinnerSports.setAdapter(adapter);
<resources>
<string-array name="array_custspinner">
<item>item1</item>
<item>item2</item>
</string-array>
</resources>