diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java
index a52d49d..479f3fa 100644
--- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java
+++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java
@@ -308,7 +308,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
dialog.show();
final Activity activity = this;
- ((Button)dialog.findViewById(R.id.win_button)).setOnClickListener(new View.OnClickListener() {
+ ((Button)dialog.findViewById(R.id.win_continue_button)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
@@ -318,7 +318,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
activity.finish();
}
});
- ((Button)dialog.findViewById(R.id.win_button2)).setOnClickListener(new View.OnClickListener() {
+ ((Button)dialog.findViewById(R.id.win_showGame_button)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
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 39fa61a..b39366b 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
@@ -6,6 +6,7 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.TypedValue;
+import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
@@ -26,7 +27,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
SudokuButton [] buttons;
GameController gameController;
Symbol symbolsToUse = Symbol.Default;
- float normalTextSize = 30; // in sp
+ float normalTextSize = 20; // in sp
LinearLayout [] layouts = new LinearLayout[2];
OnClickListener listener = new OnClickListener() {
@@ -61,6 +62,8 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
int numberOfButtonsPerRow = (size % 2 == 0) ? size/2 :(size+1)/2;
int numberOfButtons = numberOfButtonsPerRow * 2;
+ normalTextSize = (int) getResources().getDimension(R.dimen.text_size) / getResources().getDisplayMetrics().scaledDensity;
+
buttons = new SudokuButton[numberOfButtons];
//set layout parameters and init Layouts
@@ -71,7 +74,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
p = new LayoutParams(0, LayoutParams.MATCH_PARENT, 1);
}
//if (i == 0) p.bottomMargin=10; else p.topMargin=10;
- p.setMargins(0,5,0,5);
+ p.setMargins(0, 5, 0, 5);
layouts[i] = new LinearLayout(getContext(),null);
layouts[i].setLayoutParams(p);
layouts[i].setWeightSum(numberOfButtonsPerRow);
@@ -110,12 +113,13 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
*/
// buttons[number].setLayoutParams(p);
- //buttons[number].setGravity(Gravity.CENTER);
buttons[buttonIndex].setType(SudokuButtonType.Value);
buttons[buttonIndex].setTextColor(getResources().getColor(R.color.white));
buttons[buttonIndex].setBackgroundResource(R.drawable.mnenomic_numpad_button);
+ buttons[buttonIndex].setPadding(0, 0, 0, 0);
+ buttons[buttonIndex].setGravity(Gravity.CENTER);
buttons[buttonIndex].setText(Symbol.getSymbol(symbolsToUse, buttonIndex));
- buttons[buttonIndex].setTextSize(TypedValue.COMPLEX_UNIT_SP,normalTextSize);
+ buttons[buttonIndex].setTextSize(TypedValue.COMPLEX_UNIT_SP, normalTextSize);
buttons[buttonIndex].setValue(buttonIndex + 1);
buttons[buttonIndex].setOnClickListener(listener);
diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuSpecialButtonLayout.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuSpecialButtonLayout.java
index f431f55..ea02006 100644
--- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuSpecialButtonLayout.java
+++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/SudokuSpecialButtonLayout.java
@@ -171,6 +171,9 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh
fixedButtons[i].setImageBitmap(bitResult);
fixedButtons[i].setBackgroundResource(gameController.getNoteStatus() ? R.drawable.numpad_highlighted_three : R.drawable.numpad_highlighted_four);
+
+ keyboard.updateNotesEnabled();
+
break;
default:
break;
diff --git a/app/src/main/res/drawable-xhdpi/ic_star_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_star_black_48dp.png
new file mode 100644
index 0000000..7be2280
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_star_black_48dp.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_star_half_black_48dp.png b/app/src/main/res/drawable-xhdpi/ic_star_half_black_48dp.png
new file mode 100644
index 0000000..348d4d8
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_star_half_black_48dp.png differ
diff --git a/app/src/main/res/drawable/ic_star_black_48dp.png b/app/src/main/res/drawable/ic_star_black_48dp.png
new file mode 100644
index 0000000..54d3065
Binary files /dev/null and b/app/src/main/res/drawable/ic_star_black_48dp.png differ
diff --git a/app/src/main/res/drawable/ic_star_half_black_48dp.png b/app/src/main/res/drawable/ic_star_half_black_48dp.png
new file mode 100644
index 0000000..befe521
Binary files /dev/null and b/app/src/main/res/drawable/ic_star_half_black_48dp.png differ
diff --git a/app/src/main/res/drawable/ratingbar.xml b/app/src/main/res/drawable/ratingbar.xml
new file mode 100644
index 0000000..5c66e0e
--- /dev/null
+++ b/app/src/main/res/drawable/ratingbar.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
diff --git a/app/src/main/res/layout-land/activity_main_menu.xml b/app/src/main/res/layout-land/activity_main_menu.xml
index ef58358..46bc53b 100644
--- a/app/src/main/res/layout-land/activity_main_menu.xml
+++ b/app/src/main/res/layout-land/activity_main_menu.xml
@@ -109,11 +109,10 @@
android:id="@+id/difficultyBar"
android:layout_gravity="center_horizontal"
android:clickable="true"
- android:numStars="4"
+ android:numStars="3"
android:rating="1"
android:stepSize="1"
- android:scaleX="1.2"
- android:scaleY="1.2"/>
+ style="@style/RatingBar"/>