Create String array (in xml) from java array? (Android)
<pre><code>ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(RoutesActivity.this, directionArray, R.id.route_direction_spinner);
</code></pre>

<p>So, I'm trying to make a spinner, and I have a java String array (directionArray).  My problem is Eclipse returns this error when hovering over "createFromResource":
  "The method createFromResource(Context, int, int) in the type ArrayAdapter is not applicable for the arguments (RoutesActivity, String[], int)"
And gives me this Quick Fix:
  "Change type of 'directionArray' to 'int'."
Basically, I have an array in Java that I need to use in an ArrayAdapter, but apparently it won't let me.  Is there a way to create an xml resource from within java, and/or a way to bypass the above error?</p>
