first cut at putting back context menus. For games only (not groups),

and done by duplicating the .xml file. TODO: support groups, unify
menu .xml files, and have a user preference controlling whether
context menus are available or at least a newbie info explaining the
change.
This commit is contained in:
Eric House 2015-10-20 06:21:43 -07:00
parent a02ca24ab4
commit 6aa994e2c6
6 changed files with 243 additions and 155 deletions

View file

@ -8,3 +8,4 @@ studylist.xml
loc_menu.xml
empty.xml
loc_item_menu.xml
games_list_ctxt_menu.xml

View file

@ -83,33 +83,32 @@ public final class R {
public static final class id {
public static final int about_xlator=0x7f0a0001;
public static final int add_player=0x7f0a0030;
public static final int add_self_button=0x7f0a0073;
public static final int advertise_new_room_check=0x7f0a0037;
public static final int blessed_label=0x7f0a0057;
public static final int board_menu_chat=0x7f0a00a0;
public static final int board_menu_dict=0x7f0a009c;
public static final int board_menu_done=0x7f0a0087;
public static final int board_menu_file_prefs=0x7f0a0094;
public static final int board_menu_flip=0x7f0a009e;
public static final int board_menu_game_counts=0x7f0a008d;
public static final int board_menu_game_history=0x7f0a008f;
public static final int board_menu_game_left=0x7f0a008e;
public static final int board_menu_game_netstats=0x7f0a0095;
public static final int board_menu_game_resend=0x7f0a0091;
public static final int board_menu_game_resign=0x7f0a0090;
public static final int board_menu_hint_next=0x7f0a009a;
public static final int board_menu_hint_prev=0x7f0a0099;
public static final int board_menu_invite=0x7f0a0096;
public static final int board_menu_juggle=0x7f0a009d;
public static final int board_menu_rematch=0x7f0a0086;
public static final int board_menu_toggle=0x7f0a00a1;
public static final int board_menu_trade=0x7f0a0088;
public static final int board_menu_trade_cancel=0x7f0a0089;
public static final int board_menu_trade_commit=0x7f0a008a;
public static final int board_menu_tray=0x7f0a008c;
public static final int board_menu_undo_current=0x7f0a009b;
public static final int board_menu_undo_last=0x7f0a008b;
public static final int board_menu_zoom=0x7f0a009f;
public static final int board_menu_chat=0x7f0a009f;
public static final int board_menu_dict=0x7f0a009b;
public static final int board_menu_done=0x7f0a0086;
public static final int board_menu_file_prefs=0x7f0a0093;
public static final int board_menu_flip=0x7f0a009d;
public static final int board_menu_game_counts=0x7f0a008c;
public static final int board_menu_game_history=0x7f0a008e;
public static final int board_menu_game_left=0x7f0a008d;
public static final int board_menu_game_netstats=0x7f0a0094;
public static final int board_menu_game_resend=0x7f0a0090;
public static final int board_menu_game_resign=0x7f0a008f;
public static final int board_menu_hint_next=0x7f0a0099;
public static final int board_menu_hint_prev=0x7f0a0098;
public static final int board_menu_invite=0x7f0a0095;
public static final int board_menu_juggle=0x7f0a009c;
public static final int board_menu_rematch=0x7f0a0085;
public static final int board_menu_toggle=0x7f0a00a0;
public static final int board_menu_trade=0x7f0a0087;
public static final int board_menu_trade_cancel=0x7f0a0088;
public static final int board_menu_trade_commit=0x7f0a0089;
public static final int board_menu_tray=0x7f0a008b;
public static final int board_menu_undo_current=0x7f0a009a;
public static final int board_menu_undo_last=0x7f0a008a;
public static final int board_menu_zoom=0x7f0a009e;
public static final int board_root=0x7f0a0002;
public static final int board_view=0x7f0a0003;
public static final int boardsize_spinner=0x7f0a0043;
@ -122,11 +121,11 @@ public final class R {
public static final int button_rescan=0x7f0a000a;
public static final int button_study=0x7f0a0061;
public static final int change_connection=0x7f0a003b;
public static final int chat_button=0x7f0a0081;
public static final int chat_button=0x7f0a0080;
public static final int chat_edit=0x7f0a0011;
public static final int chat_history=0x7f0a0010;
public static final int chat_menu_clear=0x7f0a00a3;
public static final int chat_menu_send=0x7f0a00a2;
public static final int chat_menu_clear=0x7f0a00a2;
public static final int chat_menu_send=0x7f0a00a1;
public static final int checkbox=0x7f0a0051;
public static final int color_display_sample=0x7f0a0012;
public static final int color_edit_sample=0x7f0a0013;
@ -137,17 +136,17 @@ public final class R {
public static final int default_check=0x7f0a001c;
public static final int del=0x7f0a0054;
public static final int desc=0x7f0a001f;
public static final int details=0x7f0a0074;
public static final int details=0x7f0a0072;
public static final int dict_label=0x7f0a0069;
public static final int dict_spinner=0x7f0a002d;
public static final int dictlist_button=0x7f0a0080;
public static final int dicts_delete=0x7f0a00a6;
public static final int dicts_deselect_all=0x7f0a00a5;
public static final int dicts_download=0x7f0a00a4;
public static final int dicts_move=0x7f0a00a7;
public static final int dicts_select=0x7f0a00a8;
public static final int dictlist_button=0x7f0a007f;
public static final int dicts_delete=0x7f0a00a5;
public static final int dicts_deselect_all=0x7f0a00a4;
public static final int dicts_download=0x7f0a00a3;
public static final int dicts_move=0x7f0a00a6;
public static final int dicts_select=0x7f0a00a7;
public static final int divider=0x7f0a0024;
public static final int download_button=0x7f0a0075;
public static final int download_button=0x7f0a0073;
public static final int dwnld_message=0x7f0a004f;
public static final int edit=0x7f0a0063;
public static final int edit_blue=0x7f0a0019;
@ -160,39 +159,39 @@ public final class R {
public static final int exchange_commit=0x7f0a0005;
public static final int expander=0x7f0a0026;
public static final int filters=0x7f0a005c;
public static final int flip_button=0x7f0a0083;
public static final int flip_button=0x7f0a0082;
public static final int game_locked_check=0x7f0a0028;
public static final int game_name=0x7f0a0046;
public static final int gamel_menu_checkmoves=0x7f0a0093;
public static final int games_game_config=0x7f0a00b4;
public static final int games_game_copy=0x7f0a00b9;
public static final int games_game_delete=0x7f0a00b3;
public static final int games_game_move=0x7f0a00b5;
public static final int games_game_new_from=0x7f0a00b7;
public static final int games_game_rename=0x7f0a00b8;
public static final int games_game_reset=0x7f0a00b6;
public static final int games_group_default=0x7f0a00bd;
public static final int games_group_delete=0x7f0a00bc;
public static final int games_group_movedown=0x7f0a00bb;
public static final int games_group_moveup=0x7f0a00ba;
public static final int games_group_rename=0x7f0a00be;
public static final int games_menu_about=0x7f0a00b0;
public static final int games_menu_checkmoves=0x7f0a00b2;
public static final int games_menu_checkupdates=0x7f0a00bf;
public static final int games_menu_dicts=0x7f0a00ae;
public static final int games_menu_email=0x7f0a00af;
public static final int games_menu_loaddb=0x7f0a00c1;
public static final int games_menu_newgame_net=0x7f0a00aa;
public static final int games_menu_newgame_solo=0x7f0a00a9;
public static final int games_menu_newgroup=0x7f0a00ab;
public static final int games_menu_prefs=0x7f0a00ac;
public static final int games_menu_rateme=0x7f0a00ad;
public static final int games_menu_resend=0x7f0a00b1;
public static final int games_menu_storedb=0x7f0a00c0;
public static final int games_menu_study=0x7f0a0092;
public static final int group_done=0x7f0a0085;
public static final int group_exchange=0x7f0a0097;
public static final int group_hint=0x7f0a0098;
public static final int gamel_menu_checkmoves=0x7f0a0092;
public static final int games_game_config=0x7f0a00a9;
public static final int games_game_copy=0x7f0a00ae;
public static final int games_game_delete=0x7f0a00a8;
public static final int games_game_move=0x7f0a00aa;
public static final int games_game_new_from=0x7f0a00ac;
public static final int games_game_rename=0x7f0a00ad;
public static final int games_game_reset=0x7f0a00ab;
public static final int games_group_default=0x7f0a00bc;
public static final int games_group_delete=0x7f0a00bb;
public static final int games_group_movedown=0x7f0a00ba;
public static final int games_group_moveup=0x7f0a00b9;
public static final int games_group_rename=0x7f0a00bd;
public static final int games_menu_about=0x7f0a00b6;
public static final int games_menu_checkmoves=0x7f0a00b8;
public static final int games_menu_checkupdates=0x7f0a00be;
public static final int games_menu_dicts=0x7f0a00b4;
public static final int games_menu_email=0x7f0a00b5;
public static final int games_menu_loaddb=0x7f0a00c0;
public static final int games_menu_newgame_net=0x7f0a00b0;
public static final int games_menu_newgame_solo=0x7f0a00af;
public static final int games_menu_newgroup=0x7f0a00b1;
public static final int games_menu_prefs=0x7f0a00b2;
public static final int games_menu_rateme=0x7f0a00b3;
public static final int games_menu_resend=0x7f0a00b7;
public static final int games_menu_storedb=0x7f0a00bf;
public static final int games_menu_study=0x7f0a0091;
public static final int group_done=0x7f0a0084;
public static final int group_exchange=0x7f0a0096;
public static final int group_hint=0x7f0a0097;
public static final int hideable=0x7f0a004b;
public static final int hints_allowed=0x7f0a003c;
public static final int invite_desc=0x7f0a0009;
@ -204,38 +203,38 @@ public final class R {
public static final int label=0x7f0a0025;
public static final int lang_separator=0x7f0a002b;
public static final int lang_spinner=0x7f0a002c;
public static final int loc_item_check=0x7f0a00c3;
public static final int loc_item_clear=0x7f0a00c2;
public static final int loc_item_copy_bless=0x7f0a00c5;
public static final int loc_item_copy_eng=0x7f0a00c4;
public static final int loc_item_check=0x7f0a00c2;
public static final int loc_item_clear=0x7f0a00c1;
public static final int loc_item_copy_bless=0x7f0a00c4;
public static final int loc_item_copy_eng=0x7f0a00c3;
public static final int loc_search_button=0x7f0a005e;
public static final int loc_search_field=0x7f0a005d;
public static final int local_label=0x7f0a0059;
public static final int local_player_set=0x7f0a0067;
public static final int manual_add_button=0x7f0a0072;
public static final int manual_add_button=0x7f0a0075;
public static final int modtime=0x7f0a004c;
public static final int msg=0x7f0a0064;
public static final int msg_marker=0x7f0a0049;
public static final int name=0x7f0a0077;
public static final int name=0x7f0a0076;
public static final int name_edit=0x7f0a001d;
public static final int name_label=0x7f0a0076;
public static final int nexthint_button=0x7f0a007d;
public static final int name_label=0x7f0a0074;
public static final int nexthint_button=0x7f0a007c;
public static final int not_again_check=0x7f0a0065;
public static final int nperdev_spinner=0x7f0a000e;
public static final int number=0x7f0a0078;
public static final int number=0x7f0a0077;
public static final int other_lang=0x7f0a005f;
public static final int password_edit=0x7f0a006c;
public static final int password_set=0x7f0a006b;
public static final int phonies_spinner=0x7f0a0041;
public static final int pick_faceup=0x7f0a0042;
public static final int pick_lang=0x7f0a0079;
public static final int pick_lang_spinner=0x7f0a007a;
public static final int pick_lang=0x7f0a0078;
public static final int pick_lang_spinner=0x7f0a0079;
public static final int play_button=0x7f0a0029;
public static final int player_list=0x7f0a002f;
public static final int player_name_edit=0x7f0a0068;
public static final int players=0x7f0a0027;
public static final int players_label=0x7f0a002e;
public static final int prevhint_button=0x7f0a007c;
public static final int prevhint_button=0x7f0a007b;
public static final int private_rooms_set=0x7f0a0035;
public static final int progress_bar=0x7f0a0050;
public static final int public_rooms_set=0x7f0a0038;
@ -254,12 +253,12 @@ public final class R {
public static final int seek_green=0x7f0a0016;
public static final int seek_red=0x7f0a0014;
public static final int show_remote=0x7f0a001e;
public static final int shuffle_button=0x7f0a007e;
public static final int slmenu_clear_sel=0x7f0a00ca;
public static final int slmenu_copy_sel=0x7f0a00c9;
public static final int slmenu_deselect_all=0x7f0a00c8;
public static final int slmenu_lookup_sel=0x7f0a00c6;
public static final int slmenu_select_all=0x7f0a00c7;
public static final int shuffle_button=0x7f0a007d;
public static final int slmenu_clear_sel=0x7f0a00c9;
public static final int slmenu_copy_sel=0x7f0a00c8;
public static final int slmenu_deselect_all=0x7f0a00c7;
public static final int slmenu_lookup_sel=0x7f0a00c5;
public static final int slmenu_select_all=0x7f0a00c6;
public static final int smart_robot=0x7f0a0040;
public static final int state=0x7f0a004d;
public static final int summary=0x7f0a0060;
@ -270,10 +269,10 @@ public final class R {
public static final int thumbnail=0x7f0a004a;
public static final int timer_minutes_edit=0x7f0a003f;
public static final int timer_set=0x7f0a003e;
public static final int toolbar=0x7f0a007b;
public static final int undo_button=0x7f0a007f;
public static final int toolbar=0x7f0a007a;
public static final int undo_button=0x7f0a007e;
public static final int use_timer=0x7f0a003d;
public static final int values_button=0x7f0a0082;
public static final int values_button=0x7f0a0081;
public static final int version_string=0x7f0a0000;
public static final int view_loaded=0x7f0a0048;
public static final int view_unloaded=0x7f0a0047;
@ -283,7 +282,7 @@ public final class R {
public static final int xlated_view=0x7f0a005b;
public static final int xlated_view_blessed=0x7f0a0058;
public static final int xlated_view_local=0x7f0a005a;
public static final int zoom_button=0x7f0a0084;
public static final int zoom_button=0x7f0a0083;
}
public static final class layout {
public static final int about_dlg=0x7f030000;
@ -334,9 +333,10 @@ public final class R {
public static final int chat_menu=0x7f090001;
public static final int dicts_menu=0x7f090002;
public static final int empty=0x7f090003;
public static final int games_list_menu=0x7f090004;
public static final int loc_item_menu=0x7f090005;
public static final int studylist=0x7f090006;
public static final int games_list_ctxt_menu=0x7f090004;
public static final int games_list_menu=0x7f090005;
public static final int loc_item_menu=0x7f090006;
public static final int studylist=0x7f090007;
}
public static final class plurals {
/**
@ -2489,6 +2489,7 @@ XLATE-ME
explanation of the above
*/
public static final int explain_robot_summary=0x7f05014d;
public static final int fetching_from_relay=0x7f050327;
/** title of dialog brought up in response to the
board_menu_game_final menu. The dialog displays the final
score and an accounting of it (including subtractions for
@ -5584,6 +5585,7 @@ XLATE-ME
<string name="prev_player">Your opponent</string>
*/
public static final int prev_player=0x7f0502b7;
public static final int processing_games=0x7f050328;
/** <string name="progress_title">Downloading</string>
*/
public static final int progress_title=0x7f0502ab;
@ -5686,6 +5688,7 @@ XLATE-ME
<string name="redir_host">Invite redirect host</string>
*/
public static final int redir_host=0x7f0502e3;
public static final int rel_invite_title=0x7f050326;
/** Title of dialog used to alert players to relay-related
problems with the current game.
Title of dialog used to alert players to relay-related

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/games_game_delete"
android:title="@string/list_item_delete"
/>
<item android:id="@+id/games_game_config"
android:title="@string/list_item_config"
/>
<item android:id="@+id/games_game_move"
android:title="@string/list_item_move"
/>
<item android:id="@+id/games_game_reset"
android:title="@string/list_item_reset"
/>
<item android:id="@+id/games_game_new_from"
android:title="@string/list_item_new_from"
/>
<item android:id="@+id/games_game_rename"
android:title="@string/list_item_rename"
/>
<item android:id="@+id/games_game_copy"
android:title="@string/list_item_copy"
/>
</menu>

View file

@ -19,6 +19,8 @@
package org.eehouse.android.xw4;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@ -76,6 +78,9 @@ public class DelegateBase implements DlgClickNotify,
protected void onSaveInstanceState( Bundle outState ) {}
public boolean onPrepareOptionsMenu( Menu menu ) { return false; }
public boolean onOptionsItemSelected( MenuItem item ) { return false; }
public void onCreateContextMenu( ContextMenu menu, View view,
ContextMenuInfo menuInfo ) {}
public boolean onContextItemSelected( MenuItem item ) { return false; }
protected void onStart() {}
protected void onStop() {}
protected void onDestroy() {}

View file

@ -24,12 +24,14 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -590,6 +592,7 @@ public class GamesListDelegate extends ListDelegateBase
private Button[] m_newGameButtons;
private boolean m_haveShownGetDict;
private Intent m_rematchIntent;
private boolean m_longClickMenusEnabled = true;
public GamesListDelegate( ListDelegator delegator, Bundle sis )
{
@ -1053,7 +1056,8 @@ public class GamesListDelegate extends ListDelegateBase
// OnItemLongClickListener interface
public boolean onItemLongClick( AdapterView<?> parent, View view,
int position, long id ) {
boolean success = view instanceof SelectableItem.LongClickHandler;
boolean success = ! m_longClickMenusEnabled
&& view instanceof SelectableItem.LongClickHandler;
if ( success ) {
((SelectableItem.LongClickHandler)view).longClicked();
}
@ -1399,10 +1403,10 @@ public class GamesListDelegate extends ListDelegateBase
{
Assert.assertTrue( m_menuPrepared );
String msg;
int itemID = item.getItemId();
boolean handled = true;
boolean changeContent = false;
boolean dropSels = false;
int groupPos = getSelGroupPos();
long groupID = DBUtils.GROUPID_UNSPEC;
if ( 0 <= groupPos ) {
@ -1434,10 +1438,6 @@ public class GamesListDelegate extends ListDelegateBase
showDialog( DlgID.NEW_GROUP );
break;
case R.id.games_game_config:
GameUtils.doConfig( m_activity, selRowIDs[0], GameConfigActivity.class );
break;
case R.id.games_menu_dicts:
DictsActivity.start( m_activity );
break;
@ -1489,57 +1489,6 @@ public class GamesListDelegate extends ListDelegateBase
showToast( R.string.db_store_done );
break;
// Game menus: one or more games selected
case R.id.games_game_delete:
String msg = getQuantityString( R.plurals.confirm_seldeletes_fmt,
selRowIDs.length, selRowIDs.length );
showConfirmThen( msg, R.string.button_delete,
Action.DELETE_GAMES, selRowIDs );
break;
case R.id.games_game_move:
m_rowids = selRowIDs;
showDialog( DlgID.CHANGE_GROUP );
break;
case R.id.games_game_new_from:
dropSels = true; // will select the new game instead
showNotAgainDlgThen( R.string.not_again_newfrom,
R.string.key_notagain_newfrom,
Action.NEW_FROM, selRowIDs[0] );
break;
case R.id.games_game_copy:
final GameSummary smry = DBUtils.getSummary( m_activity, selRowIDs[0] );
if ( smry.inRelayGame() ) {
showOKOnlyDialog( R.string.no_copy_network );
} else {
dropSels = true; // will select the new game instead
post( new Runnable() {
public void run() {
Activity self = m_activity;
byte[] stream =
GameUtils.savedGame( self, selRowIDs[0] );
long groupID = XWPrefs
.getDefaultNewGameGroup( self );
GameLock lock =
GameUtils.saveNewGame( self, stream, groupID );
DBUtils.saveSummary( self, lock, smry );
m_selGames.add( lock.getRowid() );
lock.unlock();
mkListAdapter();
}
});
}
break;
case R.id.games_game_reset:
doConfirmReset( selRowIDs );
break;
case R.id.games_game_rename:
m_rowid = selRowIDs[0];
showDialog( DlgID.RENAME_GAME );
break;
// Group menus
case R.id.games_group_delete:
long dftGroup = XWPrefs.getDefaultNewGameGroup( m_activity );
@ -1579,12 +1528,9 @@ public class GamesListDelegate extends ListDelegateBase
break;
default:
handled = false;
handled = handleSelGamesItem( itemID, selRowIDs );
}
if ( dropSels ) {
clearSelections();
}
if ( changeContent ) {
mkListAdapter();
}
@ -1592,6 +1538,25 @@ public class GamesListDelegate extends ListDelegateBase
return handled;// || super.onOptionsItemSelected( item );
}
public void onCreateContextMenu( ContextMenu menu, View view,
ContextMenuInfo menuInfo )
{
super.onCreateContextMenu( menu, view, menuInfo );
m_activity.getMenuInflater()
.inflate( R.menu.games_list_ctxt_menu, menu );
}
public boolean onContextItemSelected( MenuItem item )
{
AdapterView.AdapterContextMenuInfo info
= (AdapterView.AdapterContextMenuInfo)item.getMenuInfo();
GameListItem child = (GameListItem)info.targetView;
long[] rowIDs = { child.getRowID() };
return handleSelGamesItem( item.getItemId(), rowIDs )
|| super.onContextItemSelected( item );
}
//////////////////////////////////////////////////////////////////////
// DwnldActivity.DownloadFinishedListener interface
//////////////////////////////////////////////////////////////////////
@ -1637,6 +1602,76 @@ public class GamesListDelegate extends ListDelegateBase
}
}
private boolean handleSelGamesItem( int itemID, final long[] selRowIDs )
{
boolean handled = true;
boolean dropSels = false;
switch( itemID ) {
case R.id.games_game_delete:
String msg = getQuantityString( R.plurals.confirm_seldeletes_fmt,
selRowIDs.length, selRowIDs.length );
showConfirmThen( msg, R.string.button_delete,
Action.DELETE_GAMES, selRowIDs );
break;
case R.id.games_game_config:
GameUtils.doConfig( m_activity, selRowIDs[0], GameConfigActivity.class );
break;
case R.id.games_game_move:
m_rowids = selRowIDs;
showDialog( DlgID.CHANGE_GROUP );
break;
case R.id.games_game_new_from:
dropSels = true; // will select the new game instead
showNotAgainDlgThen( R.string.not_again_newfrom,
R.string.key_notagain_newfrom,
Action.NEW_FROM, selRowIDs[0] );
break;
case R.id.games_game_copy:
final GameSummary smry = DBUtils.getSummary( m_activity, selRowIDs[0] );
if ( smry.inRelayGame() ) {
showOKOnlyDialog( R.string.no_copy_network );
} else {
dropSels = true; // will select the new game instead
post( new Runnable() {
public void run() {
Activity self = m_activity;
byte[] stream =
GameUtils.savedGame( self, selRowIDs[0] );
long groupID = XWPrefs
.getDefaultNewGameGroup( self );
GameLock lock =
GameUtils.saveNewGame( self, stream, groupID );
DBUtils.saveSummary( self, lock, smry );
m_selGames.add( lock.getRowid() );
lock.unlock();
mkListAdapter();
}
});
}
break;
case R.id.games_game_reset:
doConfirmReset( selRowIDs );
break;
case R.id.games_game_rename:
m_rowid = selRowIDs[0];
showDialog( DlgID.RENAME_GAME );
break;
default:
handled = false;
}
if ( dropSels ) {
clearSelections();
}
return handled;
}
private void setupButtons()
{
boolean hidden = XWPrefs.getHideNewgameButtons( m_activity );
@ -2229,7 +2264,9 @@ public class GamesListDelegate extends ListDelegateBase
m_adapter = new GameListAdapter();
setListAdapterKeepScroll( m_adapter );
// ListView listview = getListView();
ListView listView = getListView();
m_activity.registerForContextMenu( listView );
// String field = CommonPrefs.getSummaryField( m_activity );
// long[] positions = XWPrefs.getGroupPositions( m_activity );
// GameListAdapter adapter =

View file

@ -24,8 +24,11 @@ import android.app.Dialog;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
public class XWListActivity extends ListActivity implements ListDelegator {
@ -124,6 +127,19 @@ public class XWListActivity extends ListActivity implements ListDelegator {
return m_dlgt.onCreateOptionsMenu( menu );
}
@Override
public void onCreateContextMenu( ContextMenu menu, View view,
ContextMenuInfo menuInfo )
{
m_dlgt.onCreateContextMenu( menu, view, menuInfo );
}
@Override
public boolean onContextItemSelected( MenuItem item )
{
return m_dlgt.onContextItemSelected( item );
}
@Override
public boolean onPrepareOptionsMenu( Menu menu )
{