What is the context anyway, I am confused to differentiate between context and activity? Is the context related to an activity? Will there be any change if the activity has changed?
I have a game that has multiple activity for each activity, for each part, splash screen, menu, game screen etc. The problem is that I have a singleton sound manager that uses a sound player because it is a sound player. I want to load every sound in the splashscreen but later I think how about the context again ?
Public Zero LoadSound (reference reference, int redid, string name) {int id = sounds.load (reference, resId, priority)} I load the sound in slash screen activity, so how can I play the sound in the game screen activity? Do not have different references?
To:
On Android, a reference for many people Operation is used but to load and access most resources. This is why all widgets receive a reference parameter in their constructor. In regular Android applications, you usually have two types of events, activities and applications.
And from:
This allows access to application-specific resources and classes, as well as up-call for application-level operations Such as initiating activities, broadcasting and receiving intents and so on.
Usually each activity will have its own reference and the application itself will be a reference.
Comments
Post a Comment