mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
for game config replace onKeyDown() with onBackPressed() since only
one key was handled.
This commit is contained in:
parent
5e6bb507b7
commit
c55bba5aab
3 changed files with 5 additions and 14 deletions
|
@ -20,9 +20,7 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
public class GameConfigActivity extends XWActivity {
|
||||
|
||||
|
@ -34,11 +32,4 @@ public class GameConfigActivity extends XWActivity {
|
|||
m_dlgt = new GameConfigDelegate( this, savedInstanceState );
|
||||
super.onCreate( savedInstanceState, m_dlgt );
|
||||
} // onCreate
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown( int keyCode, KeyEvent event )
|
||||
{
|
||||
boolean consumed = m_dlgt.onKeyDown( keyCode, event );
|
||||
return consumed || super.onKeyDown( keyCode, event );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -725,12 +725,11 @@ public class GameConfigDelegate extends DelegateBase
|
|||
}
|
||||
} // onClick
|
||||
|
||||
protected boolean onKeyDown( int keyCode, KeyEvent event )
|
||||
@Override
|
||||
protected boolean onBackPressed()
|
||||
{
|
||||
boolean consumed = false;
|
||||
if ( null == m_gameLock ) {
|
||||
// Do nothing; we're on our way out
|
||||
} else if ( keyCode == KeyEvent.KEYCODE_BACK ) {
|
||||
if ( null != m_gameLock ) {
|
||||
if ( m_forResult ) {
|
||||
deleteGame();
|
||||
} else {
|
||||
|
|
|
@ -1207,7 +1207,8 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean onBackPressed() {
|
||||
protected boolean onBackPressed()
|
||||
{
|
||||
boolean handled = 0 < m_selGames.size() || 0 < m_selGroupIDs.size();
|
||||
if ( handled ) {
|
||||
showNotAgainDlgThen( R.string.not_again_backclears,
|
||||
|
|
Loading…
Reference in a new issue