public override void OnDisplayPreferenceDialog(Preference preference)
            {
                PreferenceDialogFragmentCompat fragment = null;

                if (preference is DatePreference)
                {
                    fragment = DatePreference.DatePreferenceDialogFragment.Create(preference.Key);
                }

                if (fragment == null)
                {
                    base.OnDisplayPreferenceDialog(preference);
                    return;
                }

                fragment.SetTargetFragment(this, 0);
                fragment.Show(FragmentManager, "Shults.SmtuSchedule.PreferenceDialogFragment");
            }
Exemple #2
0
        public override void OnDisplayPreferenceDialog(Preference preference)
        {
            PreferenceDialogFragmentCompat dialogFragment = null;

            if (preference is AutoCompleteTextViewPreference)
            {
                dialogFragment = AutoCompleteTextViewPreferenceDialogFragmentCompat
                                 .NewInstance(preference.Key);
            }

            if (dialogFragment != null)
            {
                dialogFragment.SetTargetFragment(this, 0);
                dialogFragment.Show(FragmentManager, "android.support.v7.preference.PreferenceFragment.DIALOG");
            }
            else
            {
                base.OnDisplayPreferenceDialog(preference);
            }
        }