diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NewWithKnowns.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NewWithKnowns.java index 91f61d0b3..f23dcc69f 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NewWithKnowns.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/NewWithKnowns.java @@ -35,15 +35,16 @@ public class NewWithKnowns extends LinearLayout { void setNames( String[] knowns, String gameName ) { - final ArrayAdapter adapter = - new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_item ); - for ( String msg : knowns ) { - adapter.add( msg ); - } + ArrayAdapter adapter = new + ArrayAdapter( getContext(), + android.R.layout.simple_spinner_item, + knowns ); + adapter.setDropDownViewResource( android.R.layout + .simple_spinner_dropdown_item ); Spinner spinner = (Spinner)findViewById( R.id.names ); spinner.setAdapter( adapter ); - EditWClear et = (EditWClear)findViewById( R.id.name_edit ); + EditText et = (EditText)findViewById( R.id.name_edit ); et.setText( gameName ); } @@ -55,7 +56,7 @@ public class NewWithKnowns extends LinearLayout { String gameName() { - EditWClear et = (EditWClear)findViewById( R.id.name_edit ); + EditText et = (EditText)findViewById( R.id.name_edit ); return et.getText().toString(); } } diff --git a/xwords4/android/app/src/main/res/layout/new_game_with_knowns.xml b/xwords4/android/app/src/main/res/layout/new_game_with_knowns.xml index 2680d88f7..51313d412 100644 --- a/xwords4/android/app/src/main/res/layout/new_game_with_knowns.xml +++ b/xwords4/android/app/src/main/res/layout/new_game_with_knowns.xml @@ -16,6 +16,7 @@ - +