mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
add board size to list whose value is set as summary.
This commit is contained in:
parent
cdbf68de67
commit
8d13050917
1 changed files with 6 additions and 6 deletions
|
@ -23,7 +23,7 @@ package org.eehouse.android.xw4;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.preference.EditTextPreference;
|
import android.preference.Preference;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
public class PrefsActivity extends PreferenceActivity
|
public class PrefsActivity extends PreferenceActivity
|
||||||
|
@ -40,9 +40,10 @@ public class PrefsActivity extends PreferenceActivity
|
||||||
addPreferencesFromResource( R.xml.xwprefs );
|
addPreferencesFromResource( R.xml.xwprefs );
|
||||||
|
|
||||||
int[] textKeyIds = { R.string.key_relay_host,
|
int[] textKeyIds = { R.string.key_relay_host,
|
||||||
R.string.key_relay_port,
|
R.string.key_relay_port,
|
||||||
R.string.key_sms_port,
|
R.string.key_sms_port,
|
||||||
R.string.key_dict_host
|
R.string.key_dict_host,
|
||||||
|
R.string.key_board_size
|
||||||
};
|
};
|
||||||
|
|
||||||
SharedPreferences sp
|
SharedPreferences sp
|
||||||
|
@ -84,8 +85,7 @@ public class PrefsActivity extends PreferenceActivity
|
||||||
|
|
||||||
private void setSummary( SharedPreferences sp, String key )
|
private void setSummary( SharedPreferences sp, String key )
|
||||||
{
|
{
|
||||||
EditTextPreference pref = (EditTextPreference)getPreferenceScreen().
|
Preference pref = getPreferenceScreen().findPreference( key );
|
||||||
findPreference( key );
|
|
||||||
String value = sp.getString( key, "" );
|
String value = sp.getString( key, "" );
|
||||||
pref.setSummary( value );
|
pref.setSummary( value );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue