Can't get button work at the same time with other piece of code
<p>I'm trying to write a very simple app for Android.
It should do 2 things:</p>

<ol>
<li>Dipslay orientation sensor information in TextView.</li>
<li>Display a toast on button click.</li>
</ol>

<p>With code below sensor information is displayed but button can't be clicked:</p>

<pre><code>package com.example.hello;

import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;




public class HelloAndroid extends Activity implements OnClickListener {
    /* Called when the activity is first created. */
    private SensorManager mSensorManager;
    private Sensor mSensor;
    private float[] mValues;

    public void onClick(View v) {
        // do something when the button is clicked
        Context context = getApplicationContext();
        Toast toast = Toast.makeText(context, "Hello", Toast.LENGTH_LONG);
        toast.show();

    }

    private final SensorEventListener mListener = new SensorEventListener() {
        public void onSensorChanged(SensorEvent event) {
            mValues = event.values;
            setContentView(R.layout.main);
            TextView t=(TextView)findViewById(R.id.status); 
            t.setText(Float.toString(mValues[0]) + "\n" +
                      Float.toString(mValues[1]) + "\n" +
                      Float.toString(mValues[2]));
        }

        public void onAccuracyChanged(Sensor sensor, int accuracy) {
        }
    };


    @Override    
    public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);

        Button button = (Button)findViewById(R.id.start);
        button.setOnClickListener(this);


        mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);
        mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);

        mSensorManager.registerListener(mListener, mSensor,
                SensorManager.SENSOR_DELAY_GAME);

    }



}
</code></pre>

<p>If I comment part of code which display sensor information the button starts to work:</p>

<pre><code>    private final SensorEventListener mListener = new SensorEventListener() {
        public void onSensorChanged(SensorEvent event) {
            mValues = event.values;
      /*    setContentView(R.layout.main);
            TextView t=(TextView)findViewById(R.id.status); 
            t.setText(Float.toString(mValues[0]) + "\n" +
                      Float.toString(mValues[1]) + "\n" +
                      Float.toString(mValues[2]));
          */ }
</code></pre>

<p>What am I doing wrong? How to get both things working at the same time?</p>
