title: Two spinner issue
body: <p>I'm trying to use two spinners at the same time but to no avail. I've created two spinners and used the if statement to differentiate the two.</p>
  
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      spinner = (Spinner) findViewById(R.id.spinner);
      adapter = ArrayAdapter.createFromResource(this, R.array.om, 
      android.R.layout.simple_spinner_item);
      adapter.setDropDownViewResource
      (android.R.layout.simple_spinner_dropdown_item);
      spinner.setAdapter(adapter);
      spinner2 = (Spinner) findViewById(R.id.spinner2);
      adapter = ArrayAdapter.createFromResource(this, R.array.om2, 
      android.R.layout.simple_spinner_item);
      adapter.setDropDownViewResource
      (android.R.layout.simple_spinner_dropdown_item);
      spinner2.setAdapter(adapter);
      spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener
      ()
  
      {
          @Override
          public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int 
          position, long id) {
              Spinner spinner = (Spinner) parent;
              if (spinner.getId() == R.id.spinner) {
  
                  switch (position) {
                      case 0:
                          x = 1 / 1000;
                          break;
                      case 1:
                          x = 1;
                          break;
                      case 2:
                          x = 1000;
                          break;
                      case 3:
                          x = 1000000;
                          break;
                  }
              }
              else if (spinner.getId() == R.id.spinner2) {
  
                  switch (position) {
                      case 0:
                          y = 1 / 1000;
                          break;
                      case 1:
                          y = 1;
                          break;
                      case 2:
                          y = 1000;
                          break;
                      case 3:
                          y = 1000000;
                          break;
                  }
              }
          }
  </code></pre>
  
  <p>Spinner and spinner2 have two arrays with mΩ,Ω,kΩ and MΩ and x,y are used to calculate something. The result of the calculation(Float sum = ((secondNumber<em>y) / ((secondNumber</em>y) + (firstNumber*x))) * thirdNumber;) is always 0. The calculation worked with one spinner. I am fairly new to java and would like a little bit of help.
  thanks</p>