title: Why it is not performing the maths in this case?
body: <p>I have a strange situation I am faced with. This should be a unit converter but it always puts in the textview the input from the edittext without performing the maths.
  The test is to operate a conversion from the number in the edittext and to report the result in the text of the textview. Now it displays in the textview what I wrote in edittext. Thank you for your time.</p>
  
  <pre><code>entepublic class lunghezze extends Activity implements OnClickListener {
  
    EditText et1;
    TextView tv1;
    Spinner spinner1,spinner2;
  
    Button btnAdd;
    String oper = "";
  
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.converter);
  
      spinner1 = (Spinner) findViewById(R.id.spinner1);
      spinner2 = (Spinner) findViewById(R.id.spinner2);
      ArrayAdapter&lt;CharSequence&gt; adapter1 = ArrayAdapter.createFromResource(this,R.array.lunghezza, android.R.layout.simple_spinner_item);
      adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner1.setAdapter(adapter1);
      ArrayAdapter&lt;CharSequence&gt; adapter2 = ArrayAdapter.createFromResource(this,R.array.lunghezza, android.R.layout.simple_spinner_item);
      adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner2.setAdapter(adapter2);
  
  
      // find the elements
      et1 = (EditText) findViewById(R.id.editText1);      
      btnAdd = (Button) findViewById(R.id.button1);           
      tv1 = (TextView) findViewById(R.id.textView4);
  
      // set a listener
      btnAdd.setOnClickListener(this);     
    }
  
    @Override
    public void onClick(View v) {
      // TODO Auto-generated method stub
      double num1 = 0;
  
      double resdelta = 0;
      double res = 0;
      double resx2 = 0;
  
      if (TextUtils.isEmpty(et1.getText().toString())) {
        return;
      }
  
      String a = et1.getText().toString().trim();
      num1 = a.isEmpty()? Double.NaN:Double.parseDouble(a);
  
      switch (v.getId()) {
      case R.id.button1:        
  
          String s1 = spinner1.getSelectedItem().toString();
          String s2 = spinner2.getSelectedItem().toString();
  
        if (s1+s2.equals( "IardeIarde") != null){
            res=num1;
  
        } else if (s1+s2.equals( "IardeLeghe") != null){
            res= 0.0005*num1;
  
        } else if (s1+s2.equals( "IardeMetri") != null){
            res= 0.91*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "IardeMiglia terrestri") != null){
            res= 0.0005*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "IardePollici") != null){
            res= 36*num1;
            tv1.setText("" + res);
  
  
        } else if (s1+s2.equals( "LegheIarde") != null){
            res= 5280*num1;
            tv1.setText("" + res);              
        } else if (s1+s2.equals( "LegheLeghe") != null){
            res=num1;
        } else if (s1+s2.equals( "LegheMetri") != null){
            res= 4828*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "LegheMiglia terrestri") != null){
            res= 3*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "LeghePollici") != null){
            res= 190080*num1;
            tv1.setText("" + res);              
  
        } else if (s1+s2.equals( "MetriIarde") != null){
            res= 1.02*num1;
            tv1.setText("" + res);              
        } else if (s1+s2.equals( "MetriLeghe") != null){
            res= 0.0002*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "MetriMetri") != null){
            res=num1;
        } else if (s1+s2.equals( "MetriMiglia terrestri") != null){
            res= 0.0006*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "MetriPollici") != null){
            res= 39.3*num1;
            tv1.setText("" + res);
  
  
        } else if (s1+s2.equals( "Miglia terrestriIarde") != null){
            res= 1760*num1;
            tv1.setText("" + res);              
        } else if (s1+s2.equals( "Miglia terrestriLeghe") != null){
            res= 0.33*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "Miglia terrestriMetri") != null){
            res= 1609.3*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "Miglia terrestriMiglia terrestri") != null){
            res=num1;
        } else if (s1+s2.equals( "Miglia terrestriPollici") != null){
            res= 63360*num1;
            tv1.setText("" + res);
  
  
        } else if (s1+s2.equals( "PolliciIarde") != null){
            res= 0.027*num1;
            tv1.setText("" + res);              
        } else if (s1+s2.equals( "PolliciLeghe") != null){
            res= 0.0000052*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "PolliciMetri") != null){
            res= 0.0254*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "PolliciMiglia terrestri") != null){
            res= 0.000015*num1;
            tv1.setText("" + res);
        } else if (s1+s2.equals( "PolliciPollici") != null){
            res=num1;           
  
        } else {
  
        }           
  
        break;
  
      default:
        break;
      }
  
      tv1.setText("" + res);
  
    }
  }
  </code></pre>