title: Error when selecting an item in my spinner
body: <p>I am getting an error java.lang.String cannot be cast to java.util.HashMap when i select a data on my spinner. I retrieve my data in my spinner from my database. Im am trying to have just only 1 class, when i select a item on my spinner it checks the id in my database to show filter and show only the selected id</p>
  
  <p>Here is my spinner select</p>
  
  <pre><code>     ArrayList&lt;HashMap&lt;String,String&gt;&gt; list1 = new ArrayList&lt;&gt;();
  
        try
              {
                  JSONArray JA = new JSONArray(result);
                  JSONObject json;
  
                  s_name = new String[JA.length()];
                  s_gender = new String[JA.length()];
  
                  for(int i = 0; i&lt;JA.length(); i++)
                  {
                      json        =  JA.getJSONObject(i);
                      s_gender[i] =  json.getString("s_gender");
                      s_name[i]   =  json.getString("s_name");
                  }
                  list1.add("All");
                  for(int i = 0; i&lt;s_name.length; i++)
                  {
                      list1.add(s_name[i] + " "+s_gender[i]);
                  }
  
  
  
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              spinner_fn();
  
  
    ArrayList&lt;HashMap&lt;String,String&gt;&gt; spinner =  new ArrayList&lt;Object&gt;(Games.this, layout.simple_spinner_dropdown_item, s_name);
          spinner1.setAdapter((SpinnerAdapter) spinner);
          spinner1.setSelection(0);
          spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  Intent intent = null;
                  switch (position) {
                      case 1:
                          intent = new Intent(getApplication(), Basketball.class);
                          HashMap&lt;Object, Object&gt; map = (HashMap)parent.getItemAtPosition(position);
                          String news_id = map.get(Config.TAG_news_id).toString();
                          String title = map.get(Config.TAG_title).toString();
                          String content = map.get(Config.TAG_content).toString();
                          String n_date = map.get(Config.TAG_n_date).toString();
                          intent.putExtra(Config.News_id,news_id);
                          intent.putExtra(Config.Title,title);
                          intent.putExtra(Config.Content,content);
                          intent.putExtra(Config.N_date,n_date);
                          startActivity(intent);
                          break;
  </code></pre>
  
  <p>I am getting the error here saying in arraylist cannot be applied to java.lang.string</p>
  
  <pre><code>(Games.this, layout.simple_spinner_dropdown_item, s_name);
  list1.add("All");
              for(int i = 0; i&lt;s_name.length; i++)
              {
                  list1.add(s_name[i] + " "+s_gender[i]);
              }
  </code></pre>