mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
translate ListPreference lists
This commit is contained in:
parent
477019757e
commit
3a7111c098
1 changed files with 10 additions and 0 deletions
|
@ -28,6 +28,7 @@ import android.content.res.Resources;
|
|||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.preference.ListPreference;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -469,6 +470,15 @@ public class LocUtils {
|
|||
pref.setTitle( str );
|
||||
}
|
||||
|
||||
if ( pref instanceof ListPreference ) {
|
||||
ListPreference lp = (ListPreference) pref;
|
||||
CharSequence[] entries = lp.getEntries();
|
||||
if ( null != entries ) {
|
||||
CharSequence[] newEntries = xlateStrings( context, entries );
|
||||
lp.setEntries( newEntries );
|
||||
}
|
||||
}
|
||||
|
||||
if ( pref instanceof PreferenceGroup ) {
|
||||
PreferenceGroup group = (PreferenceGroup)pref;
|
||||
int count = group.getPreferenceCount();
|
||||
|
|
Loading…
Add table
Reference in a new issue