title: Android Spinner Adapter Setting to spinner
body: <p>I'm using eneter framework to process communication in my android application;
  the problem is when <strong>I'm trying to populate a spinner, setting the adapter to the spinner cause an undefined exception</strong></p>
  
  <p>Here the code</p>
  
  <pre><code>public void populateSpinner(TypedResponseReceivedEventArgs&lt;String&gt; arg1){
      List&lt;String&gt; list = new ArrayList&lt;String&gt;();
      String listf = arg1.getResponseMessage();
      //sendToDebug(listf);
      StringTokenizer tokenizer = new StringTokenizer(listf,",");
      while(tokenizer.hasMoreElements()){
          list.add((String)tokenizer.nextElement());
      }
      //EditText text = (EditText)findViewById(R.id.number2EditText);
      //text.setText(list.size());
      //text.setText(listf);
      Spinner forfait = (Spinner)findViewById(R.id.forfaitsSpinner);
              ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_spinner_item,list);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      forfait.setAdapter(adapter);
  }
  </code></pre>