[mono-android] no content provider found for permission revoke
Wally McClure
theevilprogrammer at hotmail.com
Fri Jun 29 01:32:28 UTC 2012
Inline
CC: monodroid at lists.ximian.com
From: jonp at xamarin.com
Date: Thu, 28 Jun 2012 15:17:22 -0400
To: monodroid at lists.ximian.com
Subject: Re: [mono-android] no content provider found for permission revoke
On Jun 27, 2012, at 8:30 PM, Wally McClure <theevilprogrammer at hotmail.com> wrote:
Here is what I ran into. I had set my activity to implement LoaderManager.ILoaderCallbacks. Once I did that, I told VS to implement the interface. This gave me methods like:
public void OnLoadFinished
public void OnLoaderReset
While VS never blew up, I found this to not be accurate. I found that:
public void LoaderManager.ILoaderCallbacks.OnLoadFinished
public void LoaderManager.ILoaderCallbacks.OnLoaderReset
are what are actually needed.
This doesn't make sense to me. Why would an explicit interface implementation be required?Two things on this are:1. Yeah, I messed up on the public part. Was typing from memory.2. Yeah, sounds strange, but when I added LoaderManager.ILoaderCallbacks, things started to work. It might have been some different code that I changed, but it was just strange. I've seen code changes that should matter cause things to work. Yeah, I know, its completely strange.
(Also, your code will not compile unless you remove the `public` keyword.)
Another issue that hung me for a little while is that OnLoadFinished takes a Loader and a Java.Lang.Object to work properly. In the method, I actually had to convert:
(Android.database.ICurosr)data;
I don't understand this either. Did you forget some code in that message? this is method that I used that worked. It was a little bit different as well. void LoaderManager.ILoaderCallbacks.OnLoadFinished(Loader loader, Java.Lang.Object data)
{
var d = (Android.Database.ICursor)data;
adapter.SwapCursor(d);
}
- Jon
_______________________________________________
Monodroid mailing list
Monodroid at lists.ximian.com
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120628/046aab1a/attachment.html>
More information about the Monodroid
mailing list