Set edittext's text color black

This commit is contained in:
Martin Fietz 2015-03-17 09:51:44 +01:00
parent a6e2844f3a
commit f62b53edce
2 changed files with 6 additions and 2 deletions

View File

@ -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));
}
}
}

View File

@ -88,7 +88,6 @@
android:key="prefAutoUpdateIntervall"
android:summary="@string/pref_autoUpdateIntervall_sum"
android:title="@string/pref_autoUpdateIntervall_title"/>
<CheckBoxPreference
android:defaultValue="false"
android:enabled="true"