mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
use local OnClickListener rather than have Activity implement interface
This commit is contained in:
parent
3b9240ca84
commit
9b3463c8e0
1 changed files with 8 additions and 7 deletions
|
@ -42,7 +42,7 @@ import junit.framework.Assert;
|
|||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
|
||||
public class GamesList extends ListActivity implements View.OnClickListener {
|
||||
public class GamesList extends ListActivity {
|
||||
private static final int WARN_NODICT = Utils.DIALOG_LAST + 1;
|
||||
private static final int CONFIRM_DELETE_ALL = Utils.DIALOG_LAST + 2;
|
||||
|
||||
|
@ -117,7 +117,13 @@ public class GamesList extends ListActivity implements View.OnClickListener {
|
|||
registerForContextMenu( getListView() );
|
||||
|
||||
Button newGameB = (Button)findViewById(R.id.new_game);
|
||||
newGameB.setOnClickListener( this );
|
||||
newGameB.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick( View v ) {
|
||||
saveNew( new CurGameInfo( GamesList.this ) );
|
||||
onContentChanged();
|
||||
}
|
||||
} );
|
||||
|
||||
m_adapter = new GameListAdapter( this );
|
||||
setListAdapter( m_adapter );
|
||||
|
@ -262,11 +268,6 @@ public class GamesList extends ListActivity implements View.OnClickListener {
|
|||
return handled;
|
||||
}
|
||||
|
||||
public void onClick( View v ) {
|
||||
saveNew( new CurGameInfo( this ) );
|
||||
onContentChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onListItemClick(ListView l, View v, int position, long id)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue