Code example for ListFragment

Methods: onStop

0
     
	protected abstract PreferenceScreen createPreferenceHierarchy(PreferenceManager prefMan);
 
    @Override 
    public void onStop(){ 
        super.onStop(); 
        try{ 
            Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityStop");
            m.setAccessible(true);
            m.invoke(mPreferenceManager);
        }catch(Exception e){
            e.printStackTrace();
        } 
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        lv = null;
        try{ 
            Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy");