diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java
index 3b8f603..fa7149c 100644
--- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java
+++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuKeyboardLayout.java
@@ -185,17 +185,29 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
@Override
public void onHighlightChanged() {
for(SudokuButton i_btn : buttons) {
- i_btn.setBackgroundResource(R.drawable.mnenomic_numpad_button);
+ int backgroundResId = R.drawable.mnenomic_numpad_button;
- // Highlight Yellow if we are done with that number
- if(gameController.getValueCount(i_btn.getValue()) == gameController.getSize()) {
- i_btn.setBackgroundResource(R.drawable.numpad_highlighted_three);
+ boolean numCompleted = (gameController.getValueCount(i_btn.getValue()) == gameController.getSize());
+ boolean numSelected = (gameController.getSelectedValue() == i_btn.getValue());
+
+ if(numCompleted) {
+ // Fill color : darkyellow
+ // Border (if selected) : yellow
+ if(numSelected) {
+ backgroundResId = R.drawable.numpad_selected_complete;
+ } else {
+ backgroundResId = R.drawable.numpad_unselected_complete;
+ }
+ } else {
+ // Fill color : lightblue
+ // Border (if selected) : colorPrimaryDark
+ if(numSelected) {
+ backgroundResId = R.drawable.numpad_highlighted;
+ } // The else scenario is taken care of by the default initialized value
}
- if(gameController.getSelectedValue() == i_btn.getValue()) {
- // highlight button to indicate that the value is selected
- i_btn.setBackgroundResource(R.drawable.numpad_highlighted);
- }
+ i_btn.setBackgroundResource(backgroundResId);
+
}
}
diff --git a/app/src/main/res/drawable-v21/numpad_selected_complete.xml b/app/src/main/res/drawable-v21/numpad_selected_complete.xml
new file mode 100644
index 0000000..62dd7f4
--- /dev/null
+++ b/app/src/main/res/drawable-v21/numpad_selected_complete.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable-v21/numpad_unselected_complete.xml b/app/src/main/res/drawable-v21/numpad_unselected_complete.xml
new file mode 100644
index 0000000..c0716a8
--- /dev/null
+++ b/app/src/main/res/drawable-v21/numpad_unselected_complete.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/numfull.png b/app/src/main/res/drawable/numfull.png
index 9394b95..384c4ad 100644
Binary files a/app/src/main/res/drawable/numfull.png and b/app/src/main/res/drawable/numfull.png differ
diff --git a/app/src/main/res/drawable/numpad_selected_complete.xml b/app/src/main/res/drawable/numpad_selected_complete.xml
new file mode 100644
index 0000000..8a317a5
--- /dev/null
+++ b/app/src/main/res/drawable/numpad_selected_complete.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/numpad_unselected_complete.xml b/app/src/main/res/drawable/numpad_unselected_complete.xml
new file mode 100644
index 0000000..5bcd57c
--- /dev/null
+++ b/app/src/main/res/drawable/numpad_unselected_complete.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml
index 193db3b..4c929a2 100644
--- a/app/src/main/res/values-night/styles.xml
+++ b/app/src/main/res/values-night/styles.xml
@@ -21,6 +21,8 @@
- @color/lightblue
- @color/middlegrey
- @color/yellow
+ - @color/darkyellow
+ - @color/yellow
- @color/cardview_dark_background
- @color/colorPrimaryDark
- @color/colorPrimaryDark
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 21f406a..190da01 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -15,6 +15,8 @@
+
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index e265552..6e0341d 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -19,6 +19,8 @@
- @color/lightblue
- @color/middlegrey
- @color/yellow
+ - @color/darkyellow
+ - @color/yellow
- @style/ToolbarStyle
- @color/colorAccent
- @color/white