title: Android: Create spinner programmatically from array
body: <p>I'm all new to Android and I'm trying to create a spinner programmatically and feeding it with data from an array, but Eclipse gives me a warning that I can't handle.</p>
  
  <p>Here's what I got:</p>
  
  <blockquote>
    <p>This ArrayList holds the elements that should be in the spinner (gets
    filled from a file later on):</p>
    
    <p><code>ArrayList&lt;String&gt; spinnerArray = new ArrayList&lt;String&gt;();</code></p>
  </blockquote>
  
  <p>This is code I found on a site which should create the spinner:</p>
  
  <pre><code>Spinner spinner = new Spinner(this);
  ArrayAdapter spinnerArrayAdapter = new ArrayAdapter(this,
                  android.R.layout.simple_spinner_dropdown_item,
                  spinnerArray);
  spinner.setAdapter(spinnerArrayAdapter);
  </code></pre>
  
  <p>Now the second line (ArrayAdapter...) gives me a warning in Eclipse saying <code>"ArrayAdapter is a raw type... References to generic type ArrayAdapter&lt;T&gt; should be parameterized"</code>, I have no idea how to fix this (or what that means in the first place :) ).</p>
  
  <p>It's just a warning and the App seems to run alright, but I'd still like to understand what's wrong and fix it. Any hint is appreciated.</p>
  
  <p>Greetings,
  Select0r</p>