add undo button; reorder menus; fix show-values menuitem

This commit is contained in:
Andy2 2010-06-29 18:26:37 -07:00
parent e218cb7639
commit 3998a23f84
4 changed files with 44 additions and 32 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -49,6 +49,10 @@
style="@style/toolbar_button"
android:src="@drawable/zoom"
/>
<ImageButton android:id="@+id/undo_button_horizontal"
style="@style/toolbar_button"
android:src="@drawable/undo"
/>
</LinearLayout>
</LinearLayout>
@ -69,14 +73,18 @@
style="@style/toolbar_button"
android:src="@drawable/shuffle"
/>
<ImageButton android:id="@+id/flip_button_vertical"
style="@style/toolbar_button"
android:src="@drawable/flip"
/>
<ImageButton android:id="@+id/zoom_button_vertical"
style="@style/toolbar_button"
android:src="@drawable/zoom"
/>
<ImageButton android:id="@+id/undo_button_vertical"
style="@style/toolbar_button"
android:src="@drawable/undo"
/>
<ImageButton android:id="@+id/flip_button_vertical"
style="@style/toolbar_button"
android:src="@drawable/flip"
/>
</LinearLayout>
</LinearLayout>

View file

@ -5,31 +5,35 @@
<!-- android:title="@string/board_menu_juggle" -->
<!-- android:alphabeticShortcut="J" -->
<!-- /> -->
<item android:id="@+id/board_menu_done"
android:title="@string/board_menu_done"
android:alphabeticShortcut="D"
/>
<item android:id="@+id/board_menu_trade"
android:title="@string/board_menu_trade"
android:alphabeticShortcut="T"
/>
<item android:title="@string/board_submenu_undo">
<menu>
<item android:id="@+id/board_menu_undo_current"
android:title="@string/board_menu_undo_current"
/>
<item android:id="@+id/board_menu_undo_last"
android:title="@string/board_menu_undo_last"
android:alphabeticShortcut="U"
/>
</menu>
</item>
<item android:id="@+id/board_menu_undo_last"
android:title="@string/board_menu_undo_last"
android:alphabeticShortcut="U"
/>
<item android:id="@+id/board_menu_tray"
android:title="@string/board_menu_tray"
android:alphabeticShortcut="H"
/>
<!-- <item android:id="@+id/board_menu_flip" -->
<!-- android:title="@string/board_menu_flip" -->
<!-- android:alphabeticShortcut="F" -->
<!-- /> -->
<item android:id="@+id/board_menu_values"
android:title="@string/board_menu_values"
android:alphabeticShortcut="V"
/>
<item android:title="@string/board_submenu_game">
<menu>
<item android:id="@+id/board_menu_game_counts"
@ -54,18 +58,9 @@
android:title="@string/board_menu_hint_next"
android:alphabeticShortcut="H"
/>
<item android:id="@+id/board_menu_values"
android:title="@string/board_menu_values"
android:alphabeticShortcut="V"
/>
</menu>
</item>
<item android:id="@+id/board_menu_done"
android:title="@string/board_menu_done"
android:alphabeticShortcut="D"
/>
<item android:id="@+id/board_menu_file_prefs"
android:title="@string/menu_prefs"
android:alphabeticShortcut="P"

View file

@ -422,9 +422,9 @@ public class BoardActivity extends Activity implements UtilCtxt {
case R.id.board_menu_tray:
cmd = JNIThread.JNICmd.CMD_TOGGLE_TRAY;
break;
case R.id.board_menu_undo_current:
cmd = JNIThread.JNICmd.CMD_UNDO_CUR;
break;
// case R.id.board_menu_undo_current:
// cmd = JNIThread.JNICmd.CMD_UNDO_CUR;
// break;
case R.id.board_menu_undo_last:
cmd = JNIThread.JNICmd.CMD_UNDO_LAST;
break;
@ -434,9 +434,9 @@ public class BoardActivity extends Activity implements UtilCtxt {
case R.id.board_menu_hint_next:
cmd = JNIThread.JNICmd.CMD_NEXT_HINT;
break;
// case R.id.board_menu_values:
// cmd = JNIThread.JNICmd.CMD_VALUES;
// break;
case R.id.board_menu_values:
cmd = JNIThread.JNICmd.CMD_VALUES;
break;
case R.id.board_menu_game_counts:
m_jniThread.handle( JNIThread.JNICmd.CMD_COUNTS_VALUES,
@ -788,7 +788,16 @@ public class BoardActivity extends Activity implements UtilCtxt {
};
bindButtons( listener, R.id.zoom_button_horizontal,
R.id.zoom_button_vertical );
}
listener = new View.OnClickListener() {
@Override
public void onClick( View view ) {
m_jniThread.handle( JNIThread.JNICmd.CMD_UNDO_CUR );
}
};
bindButtons( listener, R.id.undo_button_horizontal,
R.id.undo_button_vertical );
} // populateToolbar
private DialogInterface.OnDismissListener makeODLforBlocking()
{