[mono-android] FW: v.FindViewById<Button>(Resource.Id.btnRemove) return null
Jonathan Pryor
jpryor at novell.com
Mon Mar 21 10:54:00 EDT 2011
On Mar 21, 2011, at 4:20 AM, Asmaa Mohamed Roushdy wrote:
> But when I add or remove or update List (books) the internal list in adapter is updated also.
> And without I add any item in list the btnRemove is null
My point is that when you add an item to MyGridView.books within MyGridView.textView_ItemClick(), that item will only be visible within managed code, _not_ the Java VM, and thus the call to mcqListAdapter.NotifyDataSetChanged() is basically a no-op, as it'll re-read the Java-side list and not see any changes. Your changes need to be visible in both VMs, and currently they're only visible within the Mono VM.
- Jon
More information about the Monodroid
mailing list