Back to project page utexas-utilities.
The source code is released under:
Apache License
If you think the Android project utexas-utilities listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nasageek.utexasutilities; /* w ww.j av a 2s . c om*/ import android.content.Context; import android.preference.ListPreference; import android.util.AttributeSet; public class FixedListPreference extends ListPreference { public FixedListPreference(final Context context) { this(context, null); } public FixedListPreference(final Context context, final AttributeSet attrs) { super(context, attrs); } @Override public CharSequence getSummary() { final CharSequence entry = getEntry(); final CharSequence summary = super.getSummary(); if (summary == null || entry == null) { return null; } else { return String.format(summary.toString(), entry); } } @Override public void setValue(final String value) { super.setValue(value); notifyChanged(); } }