views:

36

answers:

0

Hi everybody, i have a problem with ExpandableListView: in my app i use a ExpandableListView and i fill it with my adapter "class MyExpandableListAdapter extends BaseExpandableListAdapter". In method

public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
{
if (groupPosition == 0)
{ SearchView search = new SearchView(ApplicationPlaceActivity.this);
return search;
}
else if (groupPosition == 1 )
{ MyUpdates myUp = new MyUpdates(ApplicationPlaceActivity.this);
return myUp;
}
}.

This code works fine, but it's not good for me because every time i create a new instance of SearchView and MyUpdate. I make "SearchView search" and "MyUpdates myUp" as global variables but this creates some issues: after a while the layout doesn't respond on touch event, or better it responds on next touch event. so i came back with the original code posted here, but this it's no good for me. any suggestion? thanks