 <p>Figured it out. Define stuff in onViewCreated() instead of in onCreate().</p> <p>Search programmatically adding adding preferences to preference fragment. Here's one example <a href="http://stackoverflow.com/questions/17255383/how-do-i-programmatically-add-edittextpreferences-to-my-preferencefragment">How do I programmatically add EditTextPreferences to my PreferenceFragment?</a></p>