I'm using a PreferenceFragment and some headers to manage my application settings like in this official tutorial: http://developer.android.com/guide/topics/ui/settings.html#Fragment
You can call Preferences by the ActionBar in several Activities.
Now I want to detect, if a user enters oder leaves the preferences. How can I do that?
My approach is using the lifecycle methods like: onCreate, onResume, onPause ....
But is there another solution like a listener or something else?