diff --git a/xwords4/android/XWords4/res/drawable/values.png b/xwords4/android/XWords4/res/drawable/values.png
new file mode 100644
index 000000000..a42f6ab6b
Binary files /dev/null and b/xwords4/android/XWords4/res/drawable/values.png differ
diff --git a/xwords4/android/XWords4/res/layout/board.xml b/xwords4/android/XWords4/res/layout/board.xml
index efc1d15cc..096fbb7ec 100644
--- a/xwords4/android/XWords4/res/layout/board.xml
+++ b/xwords4/android/XWords4/res/layout/board.xml
@@ -41,18 +41,22 @@
style="@style/toolbar_button"
android:src="@drawable/shuffle"
/>
-
-
-
+
+
+
+
@@ -85,6 +89,10 @@
style="@style/toolbar_button"
android:src="@drawable/flip"
/>
+
diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java
index 486e9fca3..f461f0560 100644
--- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java
+++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java
@@ -773,6 +773,14 @@ public class BoardActivity extends Activity implements UtilCtxt {
.CMD_UNDO_CUR );
}
}) ;
+ m_toolbar.setListener( Toolbar.BUTTON_VALUES,
+ new View.OnClickListener() {
+ @Override
+ public void onClick( View view ) {
+ m_jniThread.handle( JNIThread.JNICmd
+ .CMD_VALUES );
+ }
+ }) ;
} // populateToolbar
private DialogInterface.OnDismissListener makeODLforBlocking()
diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java
index e5a393415..7ea5bf965 100644
--- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java
+++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java
@@ -47,6 +47,7 @@ public class Toolbar {
public static final int BUTTON_JUGGLE = 3;
public static final int BUTTON_ZOOM = 4;
public static final int BUTTON_UNDO = 5;
+ public static final int BUTTON_VALUES = 6;
private static TBButtonInfo[] s_buttonInfo = {
// BUTTON_HINT_PREV
@@ -67,6 +68,9 @@ public class Toolbar {
// BUTTON_UNDO
new TBButtonInfo( R.id.undo_button_horizontal,
R.id.undo_button_vertical ),
+ // BUTTON_VALUES
+ new TBButtonInfo( R.id.values_button_horizontal,
+ R.id.values_button_vertical ),
};
private Activity m_activity;
diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java
index ebfccd8e6..34fd03bbc 100644
--- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java
+++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java
@@ -252,9 +252,13 @@ public class JNIThread extends Thread {
private void checkButtons()
{
- int canFlip = XwJNI.board_canFlip( m_jniGamePtr ) ? 1 : 0;
+ int visTileCount = XwJNI.board_visTileCount( m_jniGamePtr );
+ int canFlip = visTileCount > 1 ? 1 : 0;
Message.obtain( m_handler, TOOLBAR_STATES, Toolbar.BUTTON_FLIP,
canFlip ).sendToTarget();
+ int canValues = visTileCount > 0 ? 1 : 0;
+ Message.obtain( m_handler, TOOLBAR_STATES, Toolbar.BUTTON_VALUES,
+ canValues ).sendToTarget();
int canShuffle = XwJNI.board_canShuffle( m_jniGamePtr ) ? 1 : 0;
Message.obtain( m_handler, TOOLBAR_STATES, Toolbar.BUTTON_JUGGLE,