mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
Don't use EditWClear; fix spinner size
This commit is contained in:
parent
b0c1c5ac1b
commit
9b12f60dbf
2 changed files with 13 additions and 13 deletions
|
@ -35,15 +35,16 @@ public class NewWithKnowns extends LinearLayout {
|
||||||
|
|
||||||
void setNames( String[] knowns, String gameName )
|
void setNames( String[] knowns, String gameName )
|
||||||
{
|
{
|
||||||
final ArrayAdapter<String> adapter =
|
ArrayAdapter<String> adapter = new
|
||||||
new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_item );
|
ArrayAdapter<String>( getContext(),
|
||||||
for ( String msg : knowns ) {
|
android.R.layout.simple_spinner_item,
|
||||||
adapter.add( msg );
|
knowns );
|
||||||
}
|
adapter.setDropDownViewResource( android.R.layout
|
||||||
|
.simple_spinner_dropdown_item );
|
||||||
Spinner spinner = (Spinner)findViewById( R.id.names );
|
Spinner spinner = (Spinner)findViewById( R.id.names );
|
||||||
spinner.setAdapter( adapter );
|
spinner.setAdapter( adapter );
|
||||||
|
|
||||||
EditWClear et = (EditWClear)findViewById( R.id.name_edit );
|
EditText et = (EditText)findViewById( R.id.name_edit );
|
||||||
et.setText( gameName );
|
et.setText( gameName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ public class NewWithKnowns extends LinearLayout {
|
||||||
|
|
||||||
String gameName()
|
String gameName()
|
||||||
{
|
{
|
||||||
EditWClear et = (EditWClear)findViewById( R.id.name_edit );
|
EditText et = (EditText)findViewById( R.id.name_edit );
|
||||||
return et.getText().toString();
|
return et.getText().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<Spinner android:id="@+id/names"
|
<Spinner android:id="@+id/names"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:drawSelectorOnTop="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView android:layout_width="fill_parent"
|
<TextView android:layout_width="fill_parent"
|
||||||
|
@ -23,9 +24,7 @@
|
||||||
android:text="Name your game"
|
android:text="Name your game"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<org.eehouse.android.xw4.EditWClear
|
<EditText android:id="@+id/name_edit"
|
||||||
style="@style/edit_w_clear"
|
|
||||||
android:id="@+id/name_edit"
|
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue