mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<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"
|
<item android:id="@+id/list_item_rename"
|
||||||
android:title="@string/list_item_rename"
|
android:title="@string/list_item_rename"
|
||||||
/>
|
/>
|
||||||
<item android:id="@+id/list_item_move"
|
<item android:id="@+id/list_item_move"
|
||||||
android:title="@string/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"
|
<item android:id="@+id/list_item_reset"
|
||||||
android:title="@string/list_item_reset"
|
android:title="@string/list_item_reset"
|
||||||
/>
|
/>
|
||||||
|
@ -22,6 +16,16 @@
|
||||||
<item android:id="@+id/list_item_copy"
|
<item android:id="@+id/list_item_copy"
|
||||||
android:title="@string/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" -->
|
<!-- <item android:id="@+id/list_item_hide" -->
|
||||||
<!-- android:title="@string/list_item_hide" -->
|
<!-- android:title="@string/list_item_hide" -->
|
||||||
<!-- /> -->
|
<!-- /> -->
|
||||||
|
|
|
@ -6,15 +6,20 @@
|
||||||
android:icon="@drawable/content_new"
|
android:icon="@drawable/content_new"
|
||||||
android:showAsAction="ifRoom"
|
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"
|
<item android:id="@+id/gamel_menu_delete"
|
||||||
android:title="@string/list_item_delete"
|
android:title="@string/list_item_delete"
|
||||||
android:icon="@drawable/ic_action_delete"
|
android:icon="@drawable/ic_action_delete"
|
||||||
android:showAsAction="ifRoom"
|
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"
|
<item android:id="@+id/gamel_menu_prefs"
|
||||||
android:title="@string/menu_prefs"
|
android:title="@string/menu_prefs"
|
||||||
android:icon="@android:drawable/ic_menu_preferences"
|
android:icon="@android:drawable/ic_menu_preferences"
|
||||||
|
|
|
@ -687,6 +687,7 @@ public class GamesList extends XWExpandableListActivity
|
||||||
|
|
||||||
int nSelected = m_selected.size();
|
int nSelected = m_selected.size();
|
||||||
Utils.setItemVisible( menu, R.id.gamel_menu_delete, 0 < nSelected );
|
Utils.setItemVisible( menu, R.id.gamel_menu_delete, 0 < nSelected );
|
||||||
|
Utils.setItemVisible( menu, R.id.listl_item_config, 1 == nSelected );
|
||||||
|
|
||||||
return super.onPrepareOptionsMenu( menu );
|
return super.onPrepareOptionsMenu( menu );
|
||||||
}
|
}
|
||||||
|
@ -704,6 +705,11 @@ public class GamesList extends XWExpandableListActivity
|
||||||
showDialog( NEW_GROUP );
|
showDialog( NEW_GROUP );
|
||||||
break;
|
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:
|
case R.id.gamel_menu_delete:
|
||||||
showConfirmThen( R.string.confirm_seldeletes, R.string.button_delete,
|
showConfirmThen( R.string.confirm_seldeletes, R.string.button_delete,
|
||||||
GamesActions.DELETE_SELGAMES.ordinal() );
|
GamesActions.DELETE_SELGAMES.ordinal() );
|
||||||
|
@ -778,10 +784,11 @@ public class GamesList extends XWExpandableListActivity
|
||||||
|
|
||||||
m_rowid = rowid;
|
m_rowid = rowid;
|
||||||
|
|
||||||
if ( R.id.list_item_delete == menuID ) {
|
if ( R.id.list_item_delete == menuID
|
||||||
showOKOnlyDialog( "This menu is going away soon. To delete games, "
|
|| R.id.list_item_config == menuID ) {
|
||||||
+ "select them by tapping the left icon then use "
|
showOKOnlyDialog( "This menu is going away soon. Please select games"
|
||||||
+ "action bar or screen menu's new delete item." );
|
+ " by tapping the left icons then use action bar"
|
||||||
|
+ " or the screen menu to operate on the selection.");
|
||||||
} else {
|
} else {
|
||||||
if ( checkWarnNoDict( m_rowid ) ) {
|
if ( checkWarnNoDict( m_rowid ) ) {
|
||||||
switch ( menuID ) {
|
switch ( menuID ) {
|
||||||
|
@ -790,9 +797,6 @@ public class GamesList extends XWExpandableListActivity
|
||||||
R.string.button_reset,
|
R.string.button_reset,
|
||||||
GamesActions.RESET_GAME.ordinal() );
|
GamesActions.RESET_GAME.ordinal() );
|
||||||
break;
|
break;
|
||||||
case R.id.list_item_config:
|
|
||||||
GameUtils.doConfig( this, m_rowid, GameConfig.class );
|
|
||||||
break;
|
|
||||||
case R.id.list_item_rename:
|
case R.id.list_item_rename:
|
||||||
showDialog( RENAME_GAME );
|
showDialog( RENAME_GAME );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue