Code example for ListFragment

Methods: onStop

0
        ((OnPreferenceAttachedListener) getActivity()).onPreferenceAttached(getPreferenceScreen(), xmlId);
    } 
 
    @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");