title: ArrayAdapter crashes when adding new items to adapter
body: <p>I am facing a problem that when I try to dynamically add items to my spinner the app crashes. So first I add an array from <code>Strings.xml</code> my <code>R.array.restrictions</code> contains 16 items therefore I am inserting each key into 16 and then adding it onto the next position. and after that I load each item from firebase and add it to the adapter, then I set the adapter, so in my mind it should work. Any ideas why it causes a crash? Says: </p>
  
  <blockquote>
    <p>UnsupportedOperationException at
    java.util.AbstractList.add(AbstractList.java:148)</p>
  </blockquote>
  
  <p>Thanks.</p>
  
  <pre><code>    public void startSpinner(){
  
      //built in Profiles
      spinner = (Spinner) findViewById(R.id.spinnerProfiles);
      adapter = ArrayAdapter.createFromResource(this, R.array.restrictions, android.R.layout.simple_spinner_item);
  
      myRef.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              // This method is called once with the initial value and again
              // whenever data at this location is updated.
              map = (Map&lt;String, Object&gt;) dataSnapshot.child("users").child(userID).getValue();
              ArrayList&lt;String&gt; array  = new ArrayList&lt;&gt;();
              int x = 16;
              for (Map.Entry&lt;String,Object&gt; entry : map.entrySet()) {
                  // key contains Profile Name
                  String key = entry.getKey();
                  adapter.insert(key, x);
                  x++;
              }
          }
          @Override
          public void onCancelled(DatabaseError databaseError) {
              //Auto Generated Method
          }
      });
      adapter.setDropDownViewResource(android.R.layout.simple_list_item_1);
      spinner.setAdapter(adapter);
      spinner.setOnItemSelectedListener(this);
  }
  </code></pre>