I need to call the BaseExpandableListAdapter method
@Override
public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
or something like that to get the view that the method returns. The problem is, if I call that method, I have to pass null to convertView, which will reinflate the view, which is the view I need.
I need the view because it contains a custom view with code I need to retrieve from it without resetting it to a new instance of itself. Take this method for example:
public ArrayList<CustomViewData> getCustomViewData ()
{
ArrayList<CustomViewData> customViewDatas = new ArrayList<>();
for(int i = 0; i < getGroupCount(); i++)
if(listView.isGroupExpanded(i))
{
View v = //getConvertView
customViewDatas.add((CustomViewData) v.findViewById(R.id.customView);
}
return customViewDatas;
}
How can I get the actual view from the ExpandableListView (or its base adapter) without creating a new view?