Search in sources :

Example 1 with PreferencesListDir

use of ar.rulosoft.custompref.PreferencesListDir in project MiMangaNu by raulhaag.

the class PreferencesFragment method onDisplayPreferenceDialog.

@Override
public final void onDisplayPreferenceDialog(Preference preference) {
    DialogFragment fragment;
    if (preference instanceof PreferencesListDir) {
        fragment = PreferenceListDirFragment.newInstance(preference);
        fragment.setTargetFragment(this, 0);
        fragment.show(getFragmentManager(), "android.support.v7.preference.PreferenceFragment.DIALOG");
    } else if (preference instanceof ColorListDialogPref) {
        fragment = ColorListDialogFragment.newInstance(preference);
        fragment.setTargetFragment(this, 0);
        fragment.show(getFragmentManager(), "android.support.v7.preference.PreferenceFragment.DIALOG");
    } else
        super.onDisplayPreferenceDialog(preference);
}
Also used : PreferencesListDir(ar.rulosoft.custompref.PreferencesListDir) ColorListDialogPref(ar.rulosoft.custompref.ColorListDialogPref) DialogFragment(android.support.v4.app.DialogFragment) ColorListDialogFragment(ar.rulosoft.custompref.ColorListDialogFragment)

Aggregations

DialogFragment (android.support.v4.app.DialogFragment)1 ColorListDialogFragment (ar.rulosoft.custompref.ColorListDialogFragment)1 ColorListDialogPref (ar.rulosoft.custompref.ColorListDialogPref)1 PreferencesListDir (ar.rulosoft.custompref.PreferencesListDir)1