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 )
|
||||
{
|
||||
final ArrayAdapter<String> adapter =
|
||||
new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_item );
|
||||
for ( String msg : knowns ) {
|
||||
adapter.add( msg );
|
||||
}
|
||||
ArrayAdapter<String> adapter = new
|
||||
ArrayAdapter<String>( 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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<Spinner android:id="@+id/names"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawSelectorOnTop="true"
|
||||
/>
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
|
@ -23,10 +24,8 @@
|
|||
android:text="Name your game"
|
||||
/>
|
||||
|
||||
<org.eehouse.android.xw4.EditWClear
|
||||
style="@style/edit_w_clear"
|
||||
android:id="@+id/name_edit"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<EditText android:id="@+id/name_edit"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</org.eehouse.android.xw4.NewWithKnowns>
|
||||
|
|
Loading…
Reference in a new issue