codes in onClickListener can't be executed
<p>I'm experiencing problem with the following code, I created two buttons with onClickListener added. </p>

<p>It works fine for the Button -- btnAbout, I'm trying to use another way to handle btnIntro, instead of by using findViewById(...) method, but the statement will not be executed when I click btnIntro. </p>

<p>Why does this happen?</p>

<pre><code>import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class TestActivity extends Activity {
    private final String TAG = "tag";
    private Button btnIntro;
    private Button btnAbout;
    private View layoutView;
    private ViewWrapper wrapper;

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

        btnAbout = (Button) findViewById(R.id.btnAbout);
        if (btnIntro == null) {
            LayoutInflater inflator = getLayoutInflater();
            layoutView = inflator.inflate(R.layout.main, null, false);
            wrapper = new ViewWrapper(layoutView);
            layoutView.setTag(wrapper);

        } else {
            wrapper = (ViewWrapper) layoutView.getTag();
        }

        btnIntro = wrapper.getButton();
        Log.e(TAG, Integer.toHexString(layoutView.getId()) + "");
        Log.e(TAG, btnIntro.getText().toString());

        btnIntro.setOnClickListener(new OnClickListener() {
            {
                Log.e(TAG, "static");
            }

            @Override
            public void onClick(View arg0) {
                Log.e(TAG, "btnIntro clicked");
                Toast.makeText(TestActivity.this, "btnIntro", Toast.LENGTH_SHORT)
                    .show();
            }
        });

        btnAbout.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View arg0) {
                Log.e(TAG, "btnAbout clicked");
                Toast.makeText(TestActivity.this, "about", Toast.LENGTH_SHORT).show();
            }
        });
    }

    class ViewWrapper {
        View base;
        Button btn1;

        ViewWrapper(View base) {
            this.base = base;
        }

        Button getButton() {
            if (btn1 == null) {
                btn1 = (Button) base.findViewById(R.id.btnIntro);
                Log.e(TAG, btn1.getText().toString());
            }
            return btn1;
        }
    }
}
</code></pre>

<p>main.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/MAIN_LAYOUT_XML"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:padding="30dip"&gt;
  &lt;TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Test" /&gt;
  &lt;Button
    android:id="@+id/btnIntro"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="btnIntro" /&gt;
  &lt;Button
    android:id="@+id/btnAbout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="btnAbout" /&gt;
&lt;/LinearLayout&gt;
</code></pre>
