Code example for Fragment

Methods: onStop

0
        super.onCreate(icicle);
    } 
     
    @Override 
    public void onStop() { 
    	super.onStop(); 
    	JSONPresets.getPresets().removeListener(this);
    	JSONSequencerPresets.getPresets().removeListener(this);
    } 
     
    @Override 
    public void onStart() { 
    	super.onStart(); 
    	JSONPresets.getPresets().addListener(this);
    	JSONSequencerPresets.getPresets().addListener(this);
    } 
     
	private SharedPreferences getSharedPreferences() {
		return getActivity().getSharedPreferences(PDActivity.SHARED_PREFERENCES_AUDIO, 0);
	} 
Contextual code suggestions in your IDE  Get Codota for Java