Search in sources :

Example 1 with PreferenceFragment

use of androidx.preference.PreferenceFragment in project SmartTubeNext by yuliskov.

the class SettingsFragment method onPreferenceStartScreen.

@Override
public boolean onPreferenceStartScreen(PreferenceFragment preferenceFragment, PreferenceScreen preferenceScreen) {
    PreferenceFragment frag = buildPreferenceFragment(R.xml.settings, preferenceScreen.getKey());
    startPreferenceFragment(frag);
    return true;
}
Also used : PreferenceFragment(androidx.preference.PreferenceFragment) LeanbackPreferenceFragment(androidx.leanback.preference.LeanbackPreferenceFragment)

Example 2 with PreferenceFragment

use of androidx.preference.PreferenceFragment in project SmartTubeNext by yuliskov.

the class SettingsFragment method buildPreferenceFragment.

private PreferenceFragment buildPreferenceFragment(int preferenceResId, String root) {
    PreferenceFragment fragment = new PrefFragment();
    Bundle args = new Bundle();
    args.putInt(PREFERENCE_RESOURCE_ID, preferenceResId);
    args.putString(PREFERENCE_ROOT, root);
    fragment.setArguments(args);
    return fragment;
}
Also used : Bundle(android.os.Bundle) PreferenceFragment(androidx.preference.PreferenceFragment) LeanbackPreferenceFragment(androidx.leanback.preference.LeanbackPreferenceFragment)

Example 3 with PreferenceFragment

use of androidx.preference.PreferenceFragment in project TV-youtube by chiou711.

the class SettingsFragment method buildPreferenceFragment.

private PreferenceFragment buildPreferenceFragment(int preferenceResId, String root) {
    PreferenceFragment fragment = new PrefFragment();
    Bundle args = new Bundle();
    args.putInt(PREFERENCE_RESOURCE_ID, preferenceResId);
    args.putString(PREFERENCE_ROOT, root);
    fragment.setArguments(args);
    return fragment;
}
Also used : Bundle(android.os.Bundle) LeanbackPreferenceFragment(androidx.leanback.preference.LeanbackPreferenceFragment) PreferenceFragment(androidx.preference.PreferenceFragment)

Example 4 with PreferenceFragment

use of androidx.preference.PreferenceFragment in project TV-youtube by chiou711.

the class SettingsFragment method onPreferenceStartScreen.

@Override
public boolean onPreferenceStartScreen(PreferenceFragment preferenceFragment, PreferenceScreen preferenceScreen) {
    PreferenceFragment frag = buildPreferenceFragment(R.xml.settings, preferenceScreen.getKey());
    startPreferenceFragment(frag);
    return true;
}
Also used : LeanbackPreferenceFragment(androidx.leanback.preference.LeanbackPreferenceFragment) PreferenceFragment(androidx.preference.PreferenceFragment)

Example 5 with PreferenceFragment

use of androidx.preference.PreferenceFragment in project SmartTubeNext by yuliskov.

the class AppDialogFragment method onPreferenceStartScreen.

@Override
public boolean onPreferenceStartScreen(PreferenceFragment preferenceFragment, PreferenceScreen preferenceScreen) {
    PreferenceFragment frag = buildPreferenceFragment();
    startPreferenceFragment(frag);
    return true;
}
Also used : LeanbackPreferenceFragment(androidx.leanback.preference.LeanbackPreferenceFragment) PreferenceFragment(androidx.preference.PreferenceFragment)

Aggregations

LeanbackPreferenceFragment (androidx.leanback.preference.LeanbackPreferenceFragment)5 PreferenceFragment (androidx.preference.PreferenceFragment)5 Bundle (android.os.Bundle)2