use of nodomain.freeyourgadget.gadgetbridge.util.XTimePreferenceFragment in project Gadgetbridge by Freeyourgadget.
the class DeviceSpecificSettingsFragment method onDisplayPreferenceDialog.
@Override
public void onDisplayPreferenceDialog(Preference preference) {
DialogFragment dialogFragment;
if (preference instanceof XTimePreference) {
dialogFragment = new XTimePreferenceFragment();
Bundle bundle = new Bundle(1);
bundle.putString("key", preference.getKey());
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
if (getFragmentManager() != null) {
dialogFragment.show(getFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
}
} else if (preference instanceof DragSortListPreference) {
dialogFragment = new DragSortListPreferenceFragment();
Bundle bundle = new Bundle(1);
bundle.putString("key", preference.getKey());
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
if (getFragmentManager() != null) {
dialogFragment.show(getFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
}
} else {
super.onDisplayPreferenceDialog(preference);
}
}
Aggregations