From f62b53edce2bd719ed4472a8fc928d6939bd48b1 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 17 Mar 2015 09:51:44 +0100 Subject: [PATCH] Set edittext's text color black --- .../antennapod/preferences/CustomEditTextPreference.java | 7 ++++++- app/src/main/res/xml/preferences.xml | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java b/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java index f292cca16..898a56004 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java @@ -6,6 +6,8 @@ import android.os.Build; import android.preference.EditTextPreference; import android.util.AttributeSet; +import de.danoeh.antennapod.R; + public class CustomEditTextPreference extends EditTextPreference { public CustomEditTextPreference(Context context, AttributeSet attrs, int defStyle) { @@ -22,7 +24,10 @@ public class CustomEditTextPreference extends EditTextPreference { @Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { - builder.setInverseBackgroundForced(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB); + if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { + builder.setInverseBackgroundForced(true); + getEditText().setTextColor(getContext().getResources().getColor(R.color.black)); + } } } diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index d3e08b441..6d14349d5 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -88,7 +88,6 @@ android:key="prefAutoUpdateIntervall" android:summary="@string/pref_autoUpdateIntervall_sum" android:title="@string/pref_autoUpdateIntervall_title"/> -