title: Is it possible to store widgets in a list/array?
body: <p>All- I have a ton of Spinners that I would like to store in a list/array so that I don't have to rewrite lots of code. I have about 30 spinners that go through the same exact code. I am trying to figure out a way to put 30 spinners in an array list and then run the array/list through my code. Example:</p>
  
  <pre><code>Spinner spinner1 = (Spinner) findViewById(R.id.spinner);
  Spinner spinner2 = (Spinner) findViewById(R.id.spinner2);
  List&lt;String&gt; listOfSpinners= new ArrayList(); // This is the part I am not sure about                       
      listOfSpinners.add(spinner1);
      listOfSpinners.add(spinner2); 
  
  
      ArrayAdapter&lt;String&gt; adapterSpinner = new ArrayAdapter&lt;String&gt;(this,
                  R.layout.spinnerlayout, infoInSpinner);
  
  
      adapterSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);  
      listOfSpinners.setAdapter(adapterSpinner); //I want to use the list here (listOfSpinners)
  </code></pre>
  
  <p>I don't even know if this is possible but I though I ask otherwise it is going to be a long night of writing repeating code:). Thanks for your time!</p>