-I try to extend a ListView widget to override onKeyDown method like this: 

```
public class MyListView extends ListView {

    public MyListView(Context context) {
        super(context);
        // TODO Auto-generated constructor stub
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        // TODO Auto-generated method stub
        return super.onKeyDown(keyCode, event);

        // My instructions
    }
}

```

-In my xml file:

```
<com.test.two.MyListView android:layout_width="150dp"
    android:layout_height="match_parent" android:id="@+id/lv"

```

-In my Activity:

```
MyListView lv = (MyListView) findViewById(R.id.lv);  

```

but it doesn't work, what is the right way to extends a listview widget, thanks.