fixed dialog fragment in preferences fragment crash on Android O

This commit is contained in:
Mariotaku Lee 2017-07-16 22:30:38 +08:00
parent c19ede55f7
commit b3fb6f34ee
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
3 changed files with 11 additions and 11 deletions

View File

@ -56,7 +56,7 @@ abstract class MultiSelectListPreference extends DialogPreference implements IDi
public void displayDialog(PreferenceFragmentCompat fragment) {
final MultiSelectListDialogFragment df = MultiSelectListDialogFragment.newInstance(getKey());
df.setTargetFragment(fragment, 0);
df.show(fragment.getChildFragmentManager(), getKey());
df.show(fragment.getFragmentManager(), getKey());
}
protected abstract boolean[] getDefaults();

View File

@ -1,10 +0,0 @@
package org.mariotaku.twidere.preference.iface;
import android.support.v7.preference.PreferenceFragmentCompat;
/**
* Created by mariotaku on 16/3/13.
*/
public interface IDialogPreference {
void displayDialog(PreferenceFragmentCompat fragment);
}

View File

@ -0,0 +1,10 @@
package org.mariotaku.twidere.preference.iface
import android.support.v7.preference.PreferenceFragmentCompat
/**
* Created by mariotaku on 16/3/13.
*/
interface IDialogPreference {
fun displayDialog(fragment: PreferenceFragmentCompat)
}