how to bind data to spinner control using arrayadapter in which arraylist data is there?
<p>I am moving from one activity to other activity in that oncreate method i am calling a webserive and get data into arraylist and assign to adapter like this</p>

<pre><code>Arrayadapter&lt;String&gt; adapter=new Arrayadapter&lt;String&gt;(this,android.R.id.layout_simpleid, arraylistobj);
</code></pre>

<p>then</p>

<pre><code>Spinner s = (Spinner) findViewById(R.id.something);
s.setAdapter(adapter);
</code></pre>

<p>but it is giving me a <code>NullPointerException</code> near <code>setAdapter(adapter)</code>.</p>
