In order to get it working, I implemented it with following approach. I am not sure, this is the best way or not.
We used
getViewTypeCount()
andgetItemViewType()
functions in listview base adapter to return different view type for each row. This way, it does not try to use same view while using ingetView()
facility.Similarly for
ExpandableListViewAdapter
, we usedgetChildTypeCount()
andgetChildType()
to return different type.
This way, I was able to achieve what I was looking for. I am sure, this is not the most optimize way as it does not allow, reusablity of components, but it works in my case, as my app does not need thousands of components in list.