/** * TODO: Activity之间传递list,对象等工具类 * * @author * @date 2014-9-12 下午5:35:38 * @version 0.1.0 */ public class FlashIntentUtils { private static volatile FlashIntentUtils instance = null; private FlashIntentUtils(){ } public static FlashIntentUtils getInstance() { if (instance == null) { synchronized (FlashIntentUtils.class) { if (instance == null) { instance = new FlashIntentUtils(); } } } return instance; } private Object object; public void putExtra(Object object) { this.object = object; } public Object getExtra() { Object extra = object; this.object = null; return extra; } }
当然也有其他方式,比如写入文件或者sqlite里面。