preference/src/main/java/androidx/preference/PreferenceFragment.java
public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
            Bundle savedInstanceState) {
        RecyclerView recyclerView = (RecyclerView) inflater
                .inflate(androidx.preference.R.layout.preference_recyclerview,
                        parent, false);

        recyclerView.setLayoutManager(onCreateLayoutManager());
        recyclerView.setAccessibilityDelegateCompat(
                new PreferenceRecyclerViewAccessibilityDelegate(recyclerView));

        return recyclerView;
    }
/**
     * Creates the {@link RecyclerView} used to display the preferences.
     * Subclasses may override this to return a customized
     * {@link RecyclerView}.
     * @param inflater The LayoutInflater object that can be used to inflate the
     *                 {@link RecyclerView}.
     * @param parent The parent {@link android.view.View} that the RecyclerView will be attached to.
     *               This method should not add the view itself, but this can be used to generate
     *               the LayoutParams of the view.
     * @param savedInstanceState If non-null, this view is being re-constructed from a previous
     *                           saved state as given here
     * @return A new RecyclerView object to be placed into the view hierarchy
     */
Creates the  RecyclerView used to display the preferences.
Subclasses may override this to return a customized
RecyclerView.
@param inflater The LayoutInflater object that can be used to inflate the
RecyclerView.
@param parent The parent  android.view.View that the RecyclerView will be attached to.
This method should not add the view itself, but this can be used to generate
the LayoutParams of the view.
@param savedInstanceState If non-null, this view is being re-constructed from a previous
saved state as given here
@return A new RecyclerView object to be placed into the view hierarchy
Creates the RecyclerView used to display the preferences . Subclasses may override this to return a customized RecyclerView . @param inflater The LayoutInflater object that can be used to inflate the RecyclerView . @param parent The parent android . view . View that the RecyclerView will be attached to . This method should not add the view itself but this can be used to generate the LayoutParams of the view . @param savedInstanceState If non - null this view is being re - constructed from a previous saved state as given here @return A new RecyclerView object to be placed into the view hierarchy
public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent,
            Bundle savedInstanceState) {
        RecyclerView recyclerView = (RecyclerView) inflater
                .inflate(androidx.preference.R.layout.preference_recyclerview,
                        parent, false);
        recyclerView.setLayoutManager(onCreateLayoutManager());
        recyclerView.setAccessibilityDelegateCompat(
                new PreferenceRecyclerViewAccessibilityDelegate(recyclerView));
        return recyclerView;
    }
public RecyclerView onCreateRecyclerView ( LayoutInflater inflater , ViewGroup parent , Bundle savedInstanceState ) { RecyclerView recyclerView = ( RecyclerView ) inflater . inflate ( androidx . preference . R . layout . preference_recyclerview , parent , false ) ; recyclerView . setLayoutManager ( onCreateLayoutManager ( ) ) ; recyclerView . setAccessibilityDelegateCompat ( new PreferenceRecyclerViewAccessibilityDelegate ( recyclerView ) ) ; return recyclerView ; }
Creates the {@link RecyclerView} used to display the preferences.
Creates the { @link RecyclerView } used to display the preferences .