addView()
on MergeAdapter
is designed for ListView
headers and the like. You, instead, are attempting to put a GridView
as an element inside of some other AdapterView
that is using the MergeAdapter
. That is not supported by MergeAdapter
, and putting a GridView
inside of another AdapterView
is unlikely to work no matter how you try to do it.
Also, I do not recommend making an Adapter
be static
, and certainly not a MergeAdapter
, as it would represent a significant memory leak (and is unnecessary in the first place).