Using SimpleAdapter with Spinner
I am new to Android development. I am trying to populate a spinner by using the SimpleAdapter. But spinner's list is showing blank element. When I click any element, its text is shown properly in Toast. Please tell me what is the problem in my code below. public void onCreate(Bundle savedInstanceState) { private List<Map<String, String>> data = new ArrayList<Map<String, String>>(); String[] from = new String[] { "colorsData" }; int[] to = new int[] { R.id.spinner }; String[] colors = getResources().getStringArray(R.array.colorsData); for (int i = 0; i < colors.length; i++) { data.add(addData