title: OnClickListener - how to implement correctly?
body: <p>OK so here is some code. Seems to have no errors however when run in Android Studio I am getting "Unfortunately, NameOfApplication has stopped". I have no idea what is wrong with it.</p>
  
  <pre><code>public class MainActivity extends Activity implements OnClickListener {
  
  EditText centimeters = (EditText) findViewById(R.id.editCentimeters);
  EditText inches = (EditText) findViewById(R.id.editInches);
  Button btnConverter = (Button) findViewById(R.id.button);
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      btnConverter.setOnClickListener(this);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public void onClick(View view) {
  
      switch(view.getId()){
          case R.id.button:
              double c = Double.valueOf(centimeters.getText().toString());
              double i = c *  0.393701;
              inches.setText(String.valueOf(i));
              break;
          default:
              break;
      }
  }
  }
  </code></pre>
  
  <p>I have another question as well. It is my beginning with Android and the reference api is quite big so what would you recommend as a best and quickest way to learn it? Get a basic understanding of its structure etc.?</p>