Source:
<code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); updateLanguagePrefSummary(); Preference languagePref = findPreference(getString(R.string.preference_key_language)); languagePref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { <START> LanguagePreferenceDialog langPrefDialog = new LanguagePreferenceDialog(getActivity()); <END> langPrefDialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { if (!findPreference(getString(R.string.preference_key_language)).getSummary().equals(WikipediaApp.getInstance().getAppLanguageLocalizedName())) { findPreference(getString(R.string.preference_key_language)).setSummary(StringUtil.emptyIfNull(WikipediaApp.getInstance().getAppLanguageLocalizedName())); getActivity().setResult(SettingsActivity.ACTIVITY_RESULT_LANGUAGE_CHANGED); } } }); langPrefDialog.show(); return true; } }); Preference logoutPref = findPreference(getString(R.string.preference_key_logout)); if (!WikipediaApp.getInstance().getUserInfoStorage().isLoggedIn()) { logoutPref.setEnabled(false); logoutPref.setSummary(getString(R.string.preference_summary_notloggedin)); } logoutPref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { getActivity().setResult(SettingsActivity.ACTIVITY_RESULT_LOGOUT); getActivity().finish(); return false; } }); if (!BuildConfig.APPLICATION_ID.equals("org.wikipedia")) { overridePackageName(); } }</code><technical_language>Try like: LanguagePreferenceDialog langPrefDialog = new LanguagePreferenceDialog( new ContextThemeWrapper(getActivity(), R.style.NoTitle)); need add a NoTitle style for dark light right now. If trouble app pick right one, WikipediaApp.getInstance().getCurrentTheme() WikipediaApp.getInstance().isCurrentThemeLight()</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); updateLanguagePrefSummary(); Preference languagePref = findPreference(getString(R.string.preference_key_language)); languagePref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { LanguagePreferenceDialog langPrefDialog = new LanguagePreferenceDialog( new ContextThemeWrapper(getActivity(), (WikipediaApp.getInstance().isCurrentThemeLight() ? R.style.NoTitle : R.style.NoTitleWikiDark))); langPrefDialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { if (!findPreference(getString(R.string.preference_key_language)).getSummary() .equals(WikipediaApp.getInstance().getAppLanguageLocalizedName())) { findPreference(getString(R.string.preference_key_language)).setSummary( StringUtil.emptyIfNull(WikipediaApp.getInstance().getAppLanguageLocalizedName())); getActivity().setResult(SettingsActivity.ACTIVITY_RESULT_LANGUAGE_CHANGED); } } }); langPrefDialog.show(); return true; } }); Preference logoutPref = findPreference(getString(R.string.preference_key_logout)); if (!WikipediaApp.getInstance().getUserInfoStorage().isLoggedIn()) { logoutPref.setEnabled(false); logoutPref.setSummary(getString(R.string.preference_summary_notloggedin)); } logoutPref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { getActivity().setResult(SettingsActivity.ACTIVITY_RESULT_LOGOUT); getActivity().finish(); return false; } }); if (!BuildConfig.APPLICATION_ID.equals("org.wikipedia")) { overridePackageName(); } }