mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +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;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.KeyEvent;
|
|
||||||
|
|
||||||
public class GameConfigActivity extends XWActivity {
|
public class GameConfigActivity extends XWActivity {
|
||||||
|
|
||||||
|
@ -34,11 +32,4 @@ public class GameConfigActivity extends XWActivity {
|
||||||
m_dlgt = new GameConfigDelegate( this, savedInstanceState );
|
m_dlgt = new GameConfigDelegate( this, savedInstanceState );
|
||||||
super.onCreate( savedInstanceState, m_dlgt );
|
super.onCreate( savedInstanceState, m_dlgt );
|
||||||
} // onCreate
|
} // 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
|
} // onClick
|
||||||
|
|
||||||
protected boolean onKeyDown( int keyCode, KeyEvent event )
|
@Override
|
||||||
|
protected boolean onBackPressed()
|
||||||
{
|
{
|
||||||
boolean consumed = false;
|
boolean consumed = false;
|
||||||
if ( null == m_gameLock ) {
|
if ( null != m_gameLock ) {
|
||||||
// Do nothing; we're on our way out
|
|
||||||
} else if ( keyCode == KeyEvent.KEYCODE_BACK ) {
|
|
||||||
if ( m_forResult ) {
|
if ( m_forResult ) {
|
||||||
deleteGame();
|
deleteGame();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1207,7 +1207,8 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean onBackPressed() {
|
protected boolean onBackPressed()
|
||||||
|
{
|
||||||
boolean handled = 0 < m_selGames.size() || 0 < m_selGroupIDs.size();
|
boolean handled = 0 < m_selGames.size() || 0 < m_selGroupIDs.size();
|
||||||
if ( handled ) {
|
if ( handled ) {
|
||||||
showNotAgainDlgThen( R.string.not_again_backclears,
|
showNotAgainDlgThen( R.string.not_again_backclears,
|
||||||
|
|
Loading…
Reference in a new issue