From cad2854d086c9fdc9e085776d4532a56fe535758 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Tue, 31 Aug 2010 06:21:46 -0700 Subject: [PATCH] fix bug by always enabling set of widgets for local player in case prev invocation of dialog hid it. --- .../org/eehouse/android/xw4/GameConfig.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 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 44cec3620..c79b47328 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java @@ -174,16 +174,6 @@ public class GameConfig extends Activity implements View.OnClickListener, loadPlayers(); } }) - .setNegativeButton( R.string.button_cancel, - new DialogInterface.OnClickListener() { - public void onClick( DialogInterface dlg, - int whichButton ) { - m_notNetworkedGameCheckbx - .setChecked( true ); - m_notNetworkedGame = true; - loadPlayers(); - } - }) .create(); dialog.setOnDismissListener( new DialogInterface.OnDismissListener() { @Override @@ -254,6 +244,8 @@ public class GameConfig extends Activity implements View.OnClickListener, Utils.setText( m_curDialog, R.id.player_name_edit, lp.name ); Utils.setText( m_curDialog, R.id.password_edit, lp.password ); + final View localSet = m_curDialog.findViewById( R.id.local_player_set ); + CheckBox check = (CheckBox) m_curDialog.findViewById( R.id.remote_check ); if ( isServer ) { @@ -261,15 +253,15 @@ public class GameConfig extends Activity implements View.OnClickListener, new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged( CompoundButton buttonView, boolean checked ) { - View view - = m_curDialog.findViewById( R.id.local_player_set ); - view.setVisibility( checked ? View.GONE : View.VISIBLE ); + localSet.setVisibility( checked ? + View.GONE : View.VISIBLE ); } }; check.setOnCheckedChangeListener( lstnr ); check.setVisibility( View.VISIBLE ); } else { check.setVisibility( View.GONE ); + localSet.setVisibility( View.VISIBLE ); } check = (CheckBox)m_curDialog.findViewById( R.id.robot_check );