redth-org / AndHUD

Android Progress HUD and Dialog helpers for Xamarin.Android apps!
Apache License 2.0
179 stars 69 forks source link

NullReferenceException when calling Show with progress > -1 #10

Closed gentledepp closed 10 years ago

gentledepp commented 10 years ago

As soon as I all "Show" with some value for progress other than -1 (above zero of course) I get a NullReferenceException. But this is how the show progress hud is supposed to be used, right?

Redth commented 10 years ago

Can you show me the code you're trying to use?

Redth commented 10 years ago

Also, did you try the samples at all?

gentledepp commented 10 years ago

Crap! My fault - though I do not know what I did wrong. What my error was: I wanted to enhance the mvvmcross plugin "UserInteraction" with progress huds, so I added the AndHUD component to the ".Android" project of that plugin. (plugin: https://github.com/brianchance/MvvmCross-UserInteraction/blob/master/Chance.MvvmCross.Plugins.UserInteraction/)

That caused all the problem, because as soon as I added your Xamarin component to the android application that is actually launched, everything works fine.

Nevertheless I'd prefer to have the component only referenced once in the plugin. Do you have any ideas how I could achieve that?

Redth commented 10 years ago

I suspect there's something to do with nested resources... Can you provide a stack trace when you do try adding it to the .Android project for that plugin?

gentledepp commented 10 years ago

Don't know what you mean. My problem with the current visual studio/xamarin installation is that I do not get the stacktraces displayed when I catch an exception. It only says "loading..." I may try to compile your project directly and debug it right away :) Tnx anyways