From 785ae531dbcd6ae1f49f4bbf521d8203948d4859 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 27 Aug 2010 06:26:25 -0700 Subject: [PATCH] add language name to dict names in GameConfig's menu too --- .../XWords4/src/org/eehouse/android/xw4/GameConfig.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java index 470f20691..dd710a470 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java @@ -76,6 +76,7 @@ public class GameConfig extends Activity implements View.OnClickListener, private Spinner m_connectSpinner; private Spinner m_phoniesSpinner; private Spinner m_dictSpinner; + private String[] m_dictItems; private String[] m_dicts; private int m_browsePosition; private LinearLayout m_playerLayout; @@ -568,12 +569,14 @@ public class GameConfig extends Activity implements View.OnClickListener, String[] list = GameUtils.dictList( this ); m_browsePosition = list.length; - m_dicts = new String[m_browsePosition+1]; - m_dicts[m_browsePosition] = getString( R.string.download_dicts ); + m_dictItems = new String[m_browsePosition+1]; + m_dictItems[m_browsePosition] = getString( R.string.download_dicts ); + m_dicts = new String[m_browsePosition]; for ( int ii = 0; ii < m_browsePosition; ++ii ) { String dict = list[ii]; m_dicts[ii] = dict; + m_dictItems[ii] = DictLangCache.annotatedDictName( this, dict ); if ( dict.equals( curDict ) ) { curSel = ii; } @@ -589,7 +592,7 @@ public class GameConfig extends Activity implements View.OnClickListener, ArrayAdapter adapter = new ArrayAdapter( this, android.R.layout.simple_spinner_item, - m_dicts ); + m_dictItems ); int resID = android.R.layout.simple_spinner_dropdown_item; adapter.setDropDownViewResource( resID ); m_dictSpinner.setAdapter( adapter );