0

I have a ton of custom adapters for a lot of gridviews. Now, I'm trying to set the data to my gridviews through a void by passing the name of the adapter as a string, something likes this:

mygridview.setAdapter(new _gridStr(mymapvariable));

But since it's a string, i obviously get an error. Isn't there some sort of way to cast the string variable to an adapter, maybe something like this:

mygridview.setAdapter(new (ListAdapter)_gridStr(mymapvariable));

Or just like how this answer shows how to one can interact with a textview through a custom string variable

https://stackoverflow.com/a/12201919/15241441

0 Answers0