Inverse background of EditTextPreference for older android versions
This commit is contained in:
parent
9fb5f33f16
commit
a6e2844f3a
@ -0,0 +1,28 @@
|
|||||||
|
package de.danoeh.antennapod.preferences;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.preference.EditTextPreference;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
public class CustomEditTextPreference extends EditTextPreference {
|
||||||
|
|
||||||
|
public CustomEditTextPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||||
|
super(context, attrs, defStyle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomEditTextPreference(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomEditTextPreference(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
|
||||||
|
builder.setInverseBackgroundForced(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -95,7 +95,7 @@
|
|||||||
android:key="prefMobileUpdate"
|
android:key="prefMobileUpdate"
|
||||||
android:summary="@string/pref_mobileUpdate_sum"
|
android:summary="@string/pref_mobileUpdate_sum"
|
||||||
android:title="@string/pref_mobileUpdate_title"/>
|
android:title="@string/pref_mobileUpdate_title"/>
|
||||||
<EditTextPreference
|
<de.danoeh.antennapod.preferences.CustomEditTextPreference
|
||||||
android:defaultValue="6"
|
android:defaultValue="6"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:key="prefParallelDownloads"
|
android:key="prefParallelDownloads"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user