Closed apps4research closed 6 years ago
Managed to get it done by adding this:
`@Override
public void onDisplayPreferenceDialog(Preference pref) {
DialogFragment dialogFragment = null;
String DIALOG_FRAGMENT_TAG = "com.takisoft.preferencex.PreferenceFragment.DIALOG";
if (pref instanceof EditTextPreference) {
dialogFragment = EditTextPreferenceDialogFragmentCompat.newInstance(pref.getKey());
} else if (pref instanceof ListPreference) {
dialogFragment = ListPreferenceDialogFragmentCompat.newInstance(pref.getKey());
}
if (dialogFragment != null) {
dialogFragment.setTargetFragment(this, 0);
dialogFragment.setCancelable(false);
if (this.getFragmentManager() != null) {
dialogFragment.show(this.getFragmentManager(), DIALOG_FRAGMENT_TAG);
}
} else {
super.onDisplayPreferenceDialog(pref);
}
}`
Would it be possible to add an option so that setCancelable() is set for the Preferences dialog? I keep keep the warning "W/InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.", when clicking outside of dialog ... setcancelable(false) would fix this problem? Thanks for the great library btw. 👍