[Monodroid] How to load Assets outside of an Activity?
Mike Kestner
mkestner at novell.com
Tue Mar 1 10:00:37 EST 2011
On Tue, 2011-03-01 at 16:44 +0200, Amir Waldman wrote:
> Thanks for the detailed explanation Jon,
>
> I ended up doing it the 'bad way' because I need to have my code
> disconnected from the 'Android Way' to make it compatible with 'Other Ways'
> too :-)
>
> To make things short, I had to pass a reference to the main activity as a
> global parameter only to load assets.
Not sure what you mean by global parameter here, but if you are keeping
hold of an Activity reference as a global variable, you may be in for
some surprises. Activities appear to be a lot more dynamic than you
might think. For instance, we've recently noticed that flipping the
screen orientation results in the creation of a new Activity, and the
destruction of the current one.
Mike
More information about the Monodroid
mailing list