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?
You can override onBackPressed on PreferenceFragment to call a interface method that is implemented on your caller/s activity.
That way you can notify what you need to your activitys.
I hope this is what you are looking for.