@Override public void onStop() { super.onStop(); if (controller != null) { controller.deleteObservers(); } PropertyCenter.getInstance().removePropertyChangeListener(this); }
@Override public void onStart() { super.onStart(); if (controller != null && adapter != null) { controller.addObserver(adapter); } PropertyCenter.getInstance().addPropertyChangeListener(this); }
@Override protected void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); PropertyCenter.getInstance().removePropertyChangeListener(this); if (controller != null) { if (mAdapter != null) { controller.deleteObserver(mAdapter); mAdapter = null; } controller.clearCache(); controller = null; } }
@Override protected void preLoadData(Bundle savedInstanceState) { super.preLoadData(savedInstanceState); PropertyCenter.getInstance().addPropertyChangeListener(this); controller = new ClockController(); }