How to change the content of Spinners dynamically
问题 I have placed 4 spinners in a SlidingDrawer . And I have created a string-array in string.xml, like <string-array name="colorArray"> <item>Red</item> <item>Green</item> <item>Blue</item> <item>Orange</item> <item>While</item> <item>Black</item> </string-array> I want to populate the spinners with this array.. For that i had done like, option1 = (Spinner)findViewById(R.id.spinner_first); adapter = ArrayAdapter.createFromResource(getApplicationContext(), R.array.colorArray, android.R.layout