Android Spinner adapting an array with unknown elements
<p>I am building spinners which contain information which I am parsing from a certain document. So I decided to adapt the spinner to an array. If I were to initialize a string array like this:</p>

<pre><code>String [] TEST = {"one", "two", "three"} and pass this string here:

ArrayAdapter&lt;String&gt; numAdapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item, TEST); 
</code></pre>

<p>Everything works fine. BUT, since I do not necessarily know what will go into the spinner I have a parser (which correctly parses and stores the information in the string array) which causes the program to crash when I pass the array to the ArrayAdapter. I tested it by building a simple string array with a loop like this:</p>

<pre><code>for(int i = 0; i &lt; 6; i++){
        test[i] = {"hi"};
    }
</code></pre>

<p>and it DOESN'T WORK. Any ideas why this might be?</p>
