@@ -0,0 +1,1915 @@
+package org.ccci.gto.android.common.preference;%0A%0Aimport android.annotation.TargetApi;%0Aimport android.content.Context;%0Aimport android.os.Build;%0Aimport android.preference.ListPreference;%0Aimport android.util.AttributeSet;%0A%0Apublic class ListPreferenceCompat extends ListPreference %7B%0A    public ListPreferenceCompat(final Context context) %7B%0A        super(context);%0A    %7D%0A%0A    public ListPreferenceCompat(final Context context, final AttributeSet attrs) %7B%0A        super(context, attrs);%0A    %7D%0A%0A    @TargetApi(Build.VERSION_CODES.LOLLIPOP)%0A    public ListPreferenceCompat(final Context context, final AttributeSet attrs, final int defStyleAttr) %7B%0A        super(context, attrs, defStyleAttr);%0A    %7D%0A%0A    @TargetApi(Build.VERSION_CODES.LOLLIPOP)%0A    public ListPreferenceCompat(final Context context, final AttributeSet attrs, final int defStyleAttr,%0A                                final int defStyleRes) %7B%0A        super(context, attrs, defStyleAttr, defStyleRes);%0A    %7D%0A%0A    /**%0A     * Returns the summary of this ListPreference. If the summary%0A     * has a %7B@linkplain java.lang.String#format String formatting%7D%0A     * marker in it (i.e. %22%25s%22 or %22%251$s%22), then the current entry%0A     * value will be substituted in its place.%0A     *%0A     * @return the summary with appropriate string substitution%0A     */%0A    @Override%0A    public CharSequence getSummary() %7B%0A        // Android pre-Honeycomb didn't support String formatting for the Summary, so we replicate that behavior here%0A        if (Build.VERSION.SDK_INT %3C= Build.VERSION_CODES.GINGERBREAD_MR1) %7B%0A            final CharSequence summary = super.getSummary();%0A            final CharSequence entry = getEntry();%0A            if (summary == null %7C%7C entry == null) %7B%0A                return summary;%0A            %7D else %7B%0A                return String.format(summary.toString(), entry);%0A            %7D%0A        %7D else %7B%0A            return super.getSummary();%0A        %7D%0A    %7D%0A%7D%0A

create ListPreferenceCompat to support String formatting for android pre-honeycomb