views:

23

answers:

0

I have a ListView and an ExpandableListView inside of a TabActivity. I have overridden the setOnItemClickListener for the ListView. I have 2 tabs and one uses the ListView and the other uses the ExpandableListView. For some reason I cannot click on any of the items in the first ListView. If I change tabs to the ExpandableListView and then go back to the first tab it will then allow me to click on the items as usual. Any ideas on why this is happening. Is there some kind of weird focus thing going on?

I have this as part of my code:

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.listview);

    listView = (ListView) findViewById(R.id.listview);

    listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                @Override
                public void onItemClick(AdapterView<?> av, View v, int pos, long id) {
                    onListItemClick(pos, id);
                    // return false;
                }
            });
}