mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
add undo button; reorder menus; fix show-values menuitem
This commit is contained in:
parent
e218cb7639
commit
3998a23f84
4 changed files with 44 additions and 32 deletions
BIN
xwords4/android/XWords4/res/drawable/undo.png
Normal file
BIN
xwords4/android/XWords4/res/drawable/undo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue