Q:

Can I override a method for a View when using XML layout?

I have a ListView in a XML layout but I want to override one of the methods. Is this possible?
    this.setContentView(R.layout.my_view);
    ListView lv = (ListView) this.findViewById(R.id.lstIngrSelect);

Now say I want to override a method of lv. How can I do that, if possible?

A:

You should create a subclass of ListView ("MyListView") and override the OnFilterComplete method there.  Then, in your layout xml, (fully) reference your class -- com.my.company.MyListView -- instead of ListView.  Use your class name in the code as well:
MyListView lv = (MyListView) this.findViewById(R.id.lstIngrSelect);

The resulting object should act identically to a regular listview except for your custom code.

