title: Android: onClickListener method does not reach end because it ends first
body: <p>I'm having a problem, the following onClickListener</p>
  
  <pre><code> check.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              Integral prev;
              if(selm.getSelectedItem().toString().equals("Trapezi"))
                  prev=new Trapezi();
              else
                  prev=new SimpsonI();
              txtit.setEnabled(!txtit.isEnabled());
              if(txtit.isEnabled()) {
                  calc = calc.getComposite();
              }
              else {
                  calc = prev;
              }
  
  
  
          }
      });
  </code></pre>
  
  <p>Does not reach the end of the method, it stops after executing line:</p>
  
  <pre><code>txtit.setEnabled(!txtit.isEnabled());
  </code></pre>
  
  <p>This is a very strange issue, so I cannot understand it's reason. I'm very new to android and i'm writing a simple application to become friendly with the Android environment, if my question is stupid, this is why! Thanks</p>