mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-07 20:46:17 +01:00
move config into actionbar from context menu, deprecating it there.
This commit is contained in:
parent
9beef6d51e
commit
9217eb71dd
3 changed files with 30 additions and 17 deletions
|
@ -1,18 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/list_item_config"
|
||||
android:title="@string/list_item_config"
|
||||
/>
|
||||
<item android:id="@+id/list_item_rename"
|
||||
android:title="@string/list_item_rename"
|
||||
/>
|
||||
<item android:id="@+id/list_item_move"
|
||||
android:title="@string/list_item_move"
|
||||
/>
|
||||
<item android:id="@+id/list_item_delete"
|
||||
android:title="@string/list_item_delete"
|
||||
/>
|
||||
<item android:id="@+id/list_item_reset"
|
||||
android:title="@string/list_item_reset"
|
||||
/>
|
||||
|
@ -22,6 +16,16 @@
|
|||
<item android:id="@+id/list_item_copy"
|
||||
android:title="@string/list_item_copy"
|
||||
/>
|
||||
|
||||
<item android:title="(rest deprecated)"/>
|
||||
|
||||
<item android:id="@+id/list_item_delete"
|
||||
android:title="@string/list_item_delete"
|
||||
/>
|
||||
<item android:id="@+id/list_item_config"
|
||||
android:title="@string/list_item_config"
|
||||
/>
|
||||
|
||||
<!-- <item android:id="@+id/list_item_hide" -->
|
||||
<!-- android:title="@string/list_item_hide" -->
|
||||
<!-- /> -->
|
||||
|
|
|
@ -6,15 +6,20 @@
|
|||
android:icon="@drawable/content_new"
|
||||
android:showAsAction="ifRoom"
|
||||
/>
|
||||
<item android:id="@+id/gamel_menu_newgroup"
|
||||
android:title="@string/button_new_group"
|
||||
android:icon="@drawable/content_new"
|
||||
/>
|
||||
<item android:id="@+id/gamel_menu_delete"
|
||||
android:title="@string/list_item_delete"
|
||||
android:icon="@drawable/ic_action_delete"
|
||||
android:showAsAction="ifRoom"
|
||||
/>
|
||||
<item android:id="@+id/listl_item_config"
|
||||
android:title="@string/list_item_config"
|
||||
android:icon="@drawable/action_settings"
|
||||
android:showAsAction="ifRoom"
|
||||
/>
|
||||
<item android:id="@+id/gamel_menu_newgroup"
|
||||
android:title="@string/button_new_group"
|
||||
android:icon="@drawable/content_new"
|
||||
/>
|
||||
<item android:id="@+id/gamel_menu_prefs"
|
||||
android:title="@string/menu_prefs"
|
||||
android:icon="@android:drawable/ic_menu_preferences"
|
||||
|
|
|
@ -687,6 +687,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
|
||||
int nSelected = m_selected.size();
|
||||
Utils.setItemVisible( menu, R.id.gamel_menu_delete, 0 < nSelected );
|
||||
Utils.setItemVisible( menu, R.id.listl_item_config, 1 == nSelected );
|
||||
|
||||
return super.onPrepareOptionsMenu( menu );
|
||||
}
|
||||
|
@ -704,6 +705,11 @@ public class GamesList extends XWExpandableListActivity
|
|||
showDialog( NEW_GROUP );
|
||||
break;
|
||||
|
||||
case R.id.listl_item_config:
|
||||
long rowid = m_selected.iterator().next();
|
||||
GameUtils.doConfig( this, rowid, GameConfig.class );
|
||||
break;
|
||||
|
||||
case R.id.gamel_menu_delete:
|
||||
showConfirmThen( R.string.confirm_seldeletes, R.string.button_delete,
|
||||
GamesActions.DELETE_SELGAMES.ordinal() );
|
||||
|
@ -778,10 +784,11 @@ public class GamesList extends XWExpandableListActivity
|
|||
|
||||
m_rowid = rowid;
|
||||
|
||||
if ( R.id.list_item_delete == menuID ) {
|
||||
showOKOnlyDialog( "This menu is going away soon. To delete games, "
|
||||
+ "select them by tapping the left icon then use "
|
||||
+ "action bar or screen menu's new delete item." );
|
||||
if ( R.id.list_item_delete == menuID
|
||||
|| R.id.list_item_config == menuID ) {
|
||||
showOKOnlyDialog( "This menu is going away soon. Please select games"
|
||||
+ " by tapping the left icons then use action bar"
|
||||
+ " or the screen menu to operate on the selection.");
|
||||
} else {
|
||||
if ( checkWarnNoDict( m_rowid ) ) {
|
||||
switch ( menuID ) {
|
||||
|
@ -790,9 +797,6 @@ public class GamesList extends XWExpandableListActivity
|
|||
R.string.button_reset,
|
||||
GamesActions.RESET_GAME.ordinal() );
|
||||
break;
|
||||
case R.id.list_item_config:
|
||||
GameUtils.doConfig( this, m_rowid, GameConfig.class );
|
||||
break;
|
||||
case R.id.list_item_rename:
|
||||
showDialog( RENAME_GAME );
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue