How to load layout with settings (addPreferencesFromResource) in such a construction ?:

public class OrderFragment extends Fragment { public OrderFragment(){} @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_order, container, false); return rootView; } } 

    1 answer 1

    Because PreferenceFragment is the successor of Fragment , then you can inherit your fragment from the PreferenceFragment , set the markup in it with the method addPreferencesFromResource () , and then act like a regular fragment. For example, add an activation screen.