mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
add title to context menu that includes game name
This commit is contained in:
parent
97d5e3cc6d
commit
e8b66e230c
2 changed files with 10 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- -*- compile-command: "../../; make install"; -*- -->
|
<!-- -*- compile-command: "cd ../../; ant install"; -*- -->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="button_new_game">Add game</string>
|
<string name="button_new_game">Add game</string>
|
||||||
|
|
||||||
|
<string name="game_item_menu_titlef">\"%s\" actions:</string>
|
||||||
<string name="list_item_config">Game settings...</string>
|
<string name="list_item_config">Game settings...</string>
|
||||||
<string name="list_item_rename">Rename...</string>
|
<string name="list_item_rename">Rename...</string>
|
||||||
<string name="game_rename_title">Rename game</string>
|
<string name="game_rename_title">Rename game</string>
|
||||||
|
|
|
@ -379,6 +379,14 @@ public class GamesList extends XWListActivity
|
||||||
{
|
{
|
||||||
MenuInflater inflater = getMenuInflater();
|
MenuInflater inflater = getMenuInflater();
|
||||||
inflater.inflate( R.menu.games_list_item_menu, menu );
|
inflater.inflate( R.menu.games_list_item_menu, menu );
|
||||||
|
|
||||||
|
AdapterView.AdapterContextMenuInfo info =
|
||||||
|
(AdapterView.AdapterContextMenuInfo)menuInfo;
|
||||||
|
int position = info.position;
|
||||||
|
long rowid = DBUtils.gamesList( this )[position];
|
||||||
|
String title = GameUtils.getName( this, rowid );
|
||||||
|
String fmt = getString(R.string.game_item_menu_titlef );
|
||||||
|
menu.setHeaderTitle( String.format( fmt, title ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue