|
|
@ -23,6 +23,7 @@ import android.os.Bundle; |
|
|
|
import android.preference.CheckBoxPreference; |
|
|
|
import android.preference.CheckBoxPreference; |
|
|
|
import android.preference.EditTextPreference; |
|
|
|
import android.preference.EditTextPreference; |
|
|
|
import android.preference.Preference; |
|
|
|
import android.preference.Preference; |
|
|
|
|
|
|
|
import android.preference.PreferenceCategory; |
|
|
|
import android.preference.PreferenceFragment; |
|
|
|
import android.preference.PreferenceFragment; |
|
|
|
import android.support.annotation.XmlRes; |
|
|
|
import android.support.annotation.XmlRes; |
|
|
|
import android.text.Editable; |
|
|
|
import android.text.Editable; |
|
|
@ -67,6 +68,12 @@ public class PreferencesFragment extends PreferenceFragment implements SharedPre |
|
|
|
|
|
|
|
|
|
|
|
addPreferencesFromResource(preference); |
|
|
|
addPreferencesFromResource(preference); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Preference emojiPreference = findPreference("emojiCompat"); |
|
|
|
|
|
|
|
if(emojiPreference != null && Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { |
|
|
|
|
|
|
|
//disable emoji fonts on Android 5 because they cause problems
|
|
|
|
|
|
|
|
((PreferenceCategory)findPreference("categoryAppearance")).removePreference(emojiPreference); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Preference regexPref = findPreference("tabFilterRegex"); |
|
|
|
Preference regexPref = findPreference("tabFilterRegex"); |
|
|
|
if (regexPref != null) regexPref.setOnPreferenceClickListener(pref -> { |
|
|
|
if (regexPref != null) regexPref.setOnPreferenceClickListener(pref -> { |
|
|
|
// Reset the error dialog when shown; if the dialog was closed with the cancel button
|
|
|
|
// Reset the error dialog when shown; if the dialog was closed with the cancel button
|
|
|
|