title: SimpleAdapter, Text and Image in spinner
body: <p>I've got a little problem. Well, let me first state what I'm trying to accomplish.
  I had a spinner that pulls strings out of a stored array. 
  Like so, you don't need to read it though:</p>
  
  <pre><code>ArrayAdapter&lt;?&gt; healthadapter = ArrayAdapter.createFromResource(this, R.array.health, android.R.layout.simple_spinner_item);
  mHealthSpin = (Spinner) findViewById(R.id.health_spin);
  healthadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  mHealthSpin.setAdapter(healthadapter);
  </code></pre>
  
  <p>Simple and almost sufficient. I would like to add an image to the <code>Spinner.</code> the <code>RadioButton</code> is not necessary. So the <code>Spinner</code> should pop up and have a list: </p>
  
  <pre>
  TEXT     *IMAGE*
  TEXT2    *IMAGE*
  TEXT3    *IMAGE*
  </pre>
  
  <p>So far I've got a custom <code>SimpleAdapter.</code>
   <strong>Here is the Problem!!</strong> : </p>
  
  <p>The text comes up but not the image.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>public class stageadapter extends SimpleAdapter {
  
      private Context localContext;
      private ArrayList&lt;HashMap&lt;String, Object&gt;&gt; localList;
  
      public stageadapter(Context context, ArrayList&lt;HashMap&lt;String, Object&gt;&gt; list, int resource, String[] from, int[] to) {
          super(context, list, resource, from, to);
          localContext = context;
          localList = list;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          if (null == convertView) {
              LayoutInflater inflater = (LayoutInflater) localContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              convertView = inflater.inflate(R.layout.stagerow, null);
          }
          TextView name = (TextView) convertView.findViewById(R.id.stage_name);
          name.setText((String) localList.get(position).get("Name"));
          ImageView icon = (ImageView) convertView.findViewById(R.id.stage_icon);
  
          icon.setImageResource(R.drawable.icon);
  
          return convertView;
      }
  
      @Override
      public View getDropDownView(int position, View convertView, ViewGroup parent) {
          if (null == convertView) {
              LayoutInflater inflater = (LayoutInflater) localContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              convertView = inflater.inflate(R.layout.stagerow, null);
          }
          TextView name = (TextView) convertView.findViewById(R.id.stage_name);
          name.setText((String) localList.get(position).get("Name"));
          ImageView icon = (ImageView) convertView.findViewById(R.id.stage_icon);
          icon.setImageResource(R.drawable.icon);
  
          return convertView;
      }
  }
  </code></pre>
  
  <p>I plan to use a <code>switch</code> statement to set different images to each name. however I stopped here until I can get any image to show.</p>
  
  <p>How i am calling:</p>
  
  <pre><code>ArrayList&lt;HashMap&lt;String, Object&gt;&gt; list = new ArrayList&lt;HashMap&lt;String, Object&gt;&gt;();
      HashMap&lt;String, Object&gt; map = new HashMap&lt;String, Object&gt;();
      map.put("Name", "One");
      map.put("Icon", R.drawable.icon);
      list.add(map);
  
      map = new HashMap&lt;String, Object&gt;();
      map.put("Name", "Two");
      map.put("Icon", R.drawable.icon);
      list.add(map);
  
      mStageSpin = (Spinner) findViewById(R.id.stage_spin);
      stageadapter adapter = new stageadapter(getApplicationContext(), list, R.layout.stagerow, new String[]{"Name", "Icon"}, new int[]{R.id.stage_name, R.id.stage_icon});
      mStageSpin.setAdapter(adapter);
  </code></pre>
  
  <p>The answer for me is in the comments.</p>