title: Android Spinner issue - The constructor ArrayAdapter<String>(NewSRO, int, String[]) is undefined
body: <p>I am having a hell of a time with a spinner under PagerAdapter. Please take a look at provide any suggestions you might have. I am simply stump, might be too late at night.
  I tried to wrap the code into separate class and then call the class with no success. Next I figured all I would need to do is add <code>getActivity()</code> from Fragment, this too I was having issues. </p>
  
  <pre><code>    public class NewSRO extends PagerAdapter {
  
      //---return the total number of pages---
      public int getCount() {
          return 3;
      }
  
      public Object instantiateItem(View collection, int position) {
          LayoutInflater inflater = (LayoutInflater) collection.getContext()
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          int resId = 0;
          View view = null; // setting view variable with null value
  
          switch (position) {
          case 0:
              resId = R.layout.new_client_1;
              view  = inflater.inflate(resId, null); // inflating view to attach spinner data
              final Spinner s1_clients;
              final String[] clients = {
                      "client1",
                      "client2",
                      "3",
                      "4"
                      };
                //---Spinner View---
                s1_clients = (Spinner) view.findViewById(R.id.spinner_client_select);
                SpinnerAdapter new_adapter = new ArrayAdapter&lt;String&gt;(
                        NewSRO.this,
                        android.R.layout.simple_spinner_item,
                        clients);           
                s1_clients.setAdapter(new_adapter);
                s1_clients.setOnItemSelectedListener(new OnItemSelectedListener() {
                    public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1, 
                    int arg2, long arg3) {
                        int index = s1_clients.getSelectedItemPosition(); Toast.makeText(null, "You have selected item : " + clients[index], 
                            Toast.LENGTH_SHORT).show();
                    }
                    public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
                    } 
                });
  
  
              break;
          case 1:
              resId = R.layout.new_client_1;
              break;
          case 2:
              resId = R.layout.new_client_1;
              break;
          }
  
          //View view = inflater.inflate(resId, null);
          ((ViewPager) collection).addView(view, 0);
          return view;
      }
  
      @Override
      public void destroyItem(View arg0, int arg1, Object arg2) {
          ((ViewPager) arg0).removeView((View) arg2);
      }
  
      @Override
      public boolean isViewFromObject(View arg0, Object arg1) {
          return arg0 == ((View) arg1);
      }
  
      @Override
      public Parcelable saveState() {
          return null;
      }
  }
  </code></pre>