Back to project page dw2020.
The source code is released under:
Apache License
If you think the Android project dw2020 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.darkwire.example; /*from w w w . j a va2 s. c o m*/ import java.util.HashMap; import com.octo.android.robospice.SpiceManager; /** * Created by fsiu on 3/21/14. */ public abstract class BaseSpiceActivity extends BaseActivity { private HashMap<String, SpiceManager> spiceManagerMap = new HashMap<String, SpiceManager>(); @Override protected void onStart() { for(SpiceManager manager : spiceManagerMap.values()) { if(!manager.isStarted()) { manager.start(this); } } super.onStart(); } @Override protected void onStop() { for(SpiceManager manager : spiceManagerMap.values()) { if(manager.isStarted()) { manager.shouldStop(); } } super.onStop(); } protected HashMap<String, SpiceManager> getSpiceManagerMap() { return spiceManagerMap; } protected void setSpiceManagerMap(HashMap<String, SpiceManager> spiceManagerMap) { this.spiceManagerMap = spiceManagerMap; } protected void addToSpiceManager(final String name, final SpiceManager spiceManager) { this.spiceManagerMap.put(name, spiceManager); } protected SpiceManager getSpiceManager(final String name) { return this.spiceManagerMap.get(name); } }