D
D
druper2019-10-01 04:31:46
Android
druper, 2019-10-01 04:31:46

How to make friends Android Navigation and hierarchical Preference?

There are application settings like

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <PreferenceCategory app:title="@string/pref_location">
        <SwitchPreferenceCompat
            app:defaultValue="true"
            app:key="pref_is_location"
            app:title="@string/pref_is_location" />

        <Preference
            app:dependency="pref_is_location"
            app:summary="@string/pref_location_settings_summary"
            app:fragment="ru.foo.bar.ui.SettingsFragment$LocationSettingsFragment"
            app:title="@string/pref_location_settings" />
    </PreferenceCategory>
....
How to open LocationSettingsFragment with Navigation component and process PreferenceFragmentCompat.OnPreferenceStartFragmentCallback?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question