[mono-android] ArrayAdapter and Dynamic Views
Jonathan Pryor
jpryor at novell.com
Tue Mar 29 10:59:31 EDT 2011
On Mar 28, 2011, at 5:37 PM, Aaron Knabb wrote:
> It seems like ArrayAdapter will only accept a resource id for the view to be populated. In my case, I'm trying to populate a view that I dynamically created in code (no xml). Is there either A) a way to get a resource ID from a dynamic control, or B) a way to get an adapter to do without the resource id?
Based on a cursory look at the ArrayAdapter.java source, I'd say that it requires a resource ID and that there's no way around it.
However, ArrayAdapter is a fairly small class (only 512 LOC, including lots of comments), so you could probably accomplish what you want by subclassing BaseAdapter and implementing IFilterable yourself.
- Jon
More information about the Monodroid
mailing list