I am new to Android, so I need a little guidance on how to programmatically add EditTextPreference objects to my PreferenceFragment
I don't know if it works in the onCreateView method but it does in the onViewCreated. Here is my code (Inside a subclass of PreferenceFragment):
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
this.getPreferenceScreen().addPreference(new EditTextPreference(getActivity()));
}