on return from selecting a new language while creating a game, change

players' wordlists to match
This commit is contained in:
Eric House 2014-07-12 15:50:01 -07:00
parent 7e9c156747
commit 03843e77d1

View file

@ -466,6 +466,7 @@ public class GameConfigDelegate extends DelegateBase
break;
case REQUEST_LANG:
String langName = data.getStringExtra( DictsDelegate.RESULT_LAST_LANG );
selLangChanged( langName );
setSpinnerSelection( m_langSpinner, langName );
break;
default:
@ -796,14 +797,7 @@ public class GameConfigDelegate extends DelegateBase
if ( chosen.equals( m_browseText ) ) {
DictsDelegate.launchForResult( m_activity, REQUEST_LANG );
} else {
m_gi.setLang( DictLangCache.
getLangLangCode( m_activity,
chosen ) );
loadPlayersList();
if ( null != m_dictSpinner ) {
configDictSpinner( m_dictSpinner, m_gi.dictLang,
m_gi.dictName );
}
selLangChanged( chosen );
}
}
@ -817,6 +811,15 @@ public class GameConfigDelegate extends DelegateBase
}
}
private void selLangChanged( String chosen )
{
m_gi.setLang( DictLangCache.getLangLangCode( m_activity, chosen ) );
loadPlayersList();
if ( null != m_dictSpinner ) {
configDictSpinner( m_dictSpinner, m_gi.dictLang, m_gi.dictName );
}
}
private void configSpinnerWDownload( Spinner spinner,
ArrayAdapter adapter,
OnItemSelectedListener onSel,