I am trying to inflate an EditText into the action bar using the following code

```
public boolean onCreateOptionsMenu(Menu menu) {
                // TODO Auto-generated method stub
                getMenuInflater().inflate(R.menu.main , menu);
       !! MenuItem mi = menu.getItem(R.id.item2);
                !!EditText et = (EditText) MenuItemCompat.getActionView(mi).findViewById(R.id.editText1);
                et.setOnEditorActionListener(this);
                return super.onCreateOptionsMenu(menu);

```

Notes: Statements marked with !! are causing the application to crash.
I am using minSdk 8.