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 31a5f0d..6c1d319 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java @@ -362,7 +362,8 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig ratingBar.setMax(numberOfStarts); ratingBar.setNumStars(numberOfStarts); ratingBar.setRating(difficutyList.indexOf(gameController.getDifficulty()) + 1); - ((TextView)findViewById(R.id.difficultyText)).setText(getString(gameController.getDifficulty().getStringResID())); + TextView diffText = ((TextView)findViewById(R.id.difficultyText)); + diffText.setText(getString(gameController.getDifficulty().getStringResID())); DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java index be2b943..08b1078 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java @@ -161,6 +161,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig difficultyBar.setNumStars(difficultyList.size()); difficultyBar.setMax(difficultyList.size()); CheckBox createGameBar = (CheckBox) findViewById(R.id.circleButton); + createGameBar.setButtonDrawable(R.drawable.create_game_src); difficultyBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() { @Override public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) { @@ -177,16 +178,14 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig } }); - createGameBar.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + createGameBar.setOnClickListener(new View.OnClickListener() { @Override - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - if (isChecked) { - - difficultyBar.setRating(0); - ((Button)findViewById(R.id.playButton)).setText(R.string.create_game); - } - createGameBar.setChecked(isChecked); - }}); + public void onClick(View v) { + difficultyBar.setRating(0); + ((Button)findViewById(R.id.playButton)).setText(R.string.create_game); + createGameBar.setChecked(true); + } + }); String retrievedDifficulty = settings.getString("lastChosenDifficulty", "Moderate"); GameDifficulty lastChosenDifficulty = GameDifficulty.valueOf( @@ -320,10 +319,10 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig List gic = fm.loadGameStateInfo(); if(gic.size() > 0 && !(gic.size() == 1 && gic.get(0).getID() == GameController.DAILY_SUDOKU_ID)) { continueButton.setEnabled(true); - continueButton.setBackgroundResource(R.drawable.standalone_button); + continueButton.setBackgroundResource(R.drawable.button_standalone); } else { continueButton.setEnabled(false); - continueButton.setBackgroundResource(R.drawable.inactive_button); + continueButton.setBackgroundResource(R.drawable.button_inactive); } } diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/TutorialActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/TutorialActivity.java index 609d750..5313c8e 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/TutorialActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/TutorialActivity.java @@ -31,6 +31,7 @@ import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.Button; +import android.widget.CheckBox; import android.widget.LinearLayout; import android.widget.TextView; @@ -212,6 +213,11 @@ public class TutorialActivity extends AppCompatActivity { View view = layoutInflater.inflate(layouts[position], container, false); container.addView(view); + CheckBox createGameBar = (CheckBox) findViewById(R.id.circleButton); + if(createGameBar != null) { + createGameBar.setButtonDrawable(R.drawable.create_game_src); + } + return view; } diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/CreateSudokuSpecialButtonLayout.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/CreateSudokuSpecialButtonLayout.java index 0a92c1e..299cca3 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/CreateSudokuSpecialButtonLayout.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/CreateSudokuSpecialButtonLayout.java @@ -24,7 +24,6 @@ import android.app.FragmentManager; import android.content.Context; import android.content.DialogInterface; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.os.Bundle; @@ -33,16 +32,13 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.Toast; import androidx.core.content.ContextCompat; import org.secuso.privacyfriendlysudoku.controller.GameController; import org.secuso.privacyfriendlysudoku.game.listener.IHighlightChangedListener; -import org.secuso.privacyfriendlysudoku.ui.GameActivity; import org.secuso.privacyfriendlysudoku.ui.MainActivity; import org.secuso.privacyfriendlysudoku.ui.listener.IFinalizeDialogFragmentListener; -import org.secuso.privacyfriendlysudoku.ui.listener.IHintDialogFragmentListener; import org.secuso.privacyfriendlysudoku.ui.listener.IImportDialogFragmentListener; import java.util.LinkedList; @@ -173,11 +169,11 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi switch(fixedButtons[i].getType()) { case Undo: fixedButtons[i].setBackgroundResource(gameController.isUndoAvailable() ? - R.drawable.numpad_highlighted_four : R.drawable.inactive_button); + R.drawable.numpad_highlighted_four : R.drawable.button_inactive); break; case Do: fixedButtons[i].setBackgroundResource(gameController.isRedoAvailable() ? - R.drawable.numpad_highlighted_four : R.drawable.inactive_button); + R.drawable.numpad_highlighted_four : R.drawable.button_inactive); break; default: break; 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 b676b89..bf01a21 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 @@ -24,7 +24,6 @@ import android.app.FragmentManager; import android.content.Context; import android.content.DialogInterface; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.os.Bundle; @@ -39,7 +38,6 @@ import androidx.core.content.ContextCompat; import org.secuso.privacyfriendlysudoku.controller.GameController; import org.secuso.privacyfriendlysudoku.game.listener.IHighlightChangedListener; -import org.secuso.privacyfriendlysudoku.ui.GameActivity; import org.secuso.privacyfriendlysudoku.ui.listener.IHintDialogFragmentListener; import java.util.LinkedList; @@ -183,11 +181,11 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh switch(fixedButtons[i].getType()) { case Undo: fixedButtons[i].setBackgroundResource(gameController.isUndoAvailable() ? - R.drawable.numpad_highlighted_four : R.drawable.inactive_button); + R.drawable.numpad_highlighted_four : R.drawable.button_inactive); break; case Do: fixedButtons[i].setBackgroundResource(gameController.isRedoAvailable() ? - R.drawable.numpad_highlighted_four : R.drawable.inactive_button); + R.drawable.numpad_highlighted_four : R.drawable.button_inactive); break; case NoteToggle: Drawable drawable = ContextCompat.getDrawable(context, fixedButtons[i].getType().getResID()); diff --git a/app/src/main/res/drawable/ic_trophy_award_black_48dp.xml b/app/src/main/res/drawable-night-v21/ic_trophy_award_black_48dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_trophy_award_black_48dp.xml rename to app/src/main/res/drawable-night-v21/ic_trophy_award_black_48dp.xml diff --git a/app/src/main/res/drawable/ic_trophy_black_48dp.xml b/app/src/main/res/drawable-night-v21/ic_trophy_black_48dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_trophy_black_48dp.xml rename to app/src/main/res/drawable-night-v21/ic_trophy_black_48dp.xml diff --git a/app/src/main/res/drawable-night-v21/numpad_highlighted_four.xml b/app/src/main/res/drawable-night-v21/numpad_highlighted_four.xml new file mode 100644 index 0000000..87ce8d9 --- /dev/null +++ b/app/src/main/res/drawable-night-v21/numpad_highlighted_four.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-night/ic_trophy_award_black_48dp.png b/app/src/main/res/drawable-night/ic_trophy_award_black_48dp.png new file mode 100644 index 0000000..92d66b7 Binary files /dev/null and b/app/src/main/res/drawable-night/ic_trophy_award_black_48dp.png differ diff --git a/app/src/main/res/drawable-night/ic_trophy_black_48dp.png b/app/src/main/res/drawable-night/ic_trophy_black_48dp.png new file mode 100644 index 0000000..46f2e92 Binary files /dev/null and b/app/src/main/res/drawable-night/ic_trophy_black_48dp.png differ diff --git a/app/src/main/res/drawable-night/numpad_highlighted_four.xml b/app/src/main/res/drawable-night/numpad_highlighted_four.xml new file mode 100644 index 0000000..29b7638 --- /dev/null +++ b/app/src/main/res/drawable-night/numpad_highlighted_four.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/inactive_button.xml b/app/src/main/res/drawable-v21/button_inactive.xml similarity index 100% rename from app/src/main/res/drawable/inactive_button.xml rename to app/src/main/res/drawable-v21/button_inactive.xml diff --git a/app/src/main/res/drawable/standalone_button.xml b/app/src/main/res/drawable-v21/button_standalone.xml similarity index 100% rename from app/src/main/res/drawable/standalone_button.xml rename to app/src/main/res/drawable-v21/button_standalone.xml diff --git a/app/src/main/res/drawable-v21/ic_trophy_award_black_48dp.xml b/app/src/main/res/drawable-v21/ic_trophy_award_black_48dp.xml new file mode 100644 index 0000000..8dfe2b4 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_trophy_award_black_48dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable-v21/ic_trophy_black_48dp.xml b/app/src/main/res/drawable-v21/ic_trophy_black_48dp.xml new file mode 100644 index 0000000..844b657 --- /dev/null +++ b/app/src/main/res/drawable-v21/ic_trophy_black_48dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable-v21/mnenomic_numpad_button.xml b/app/src/main/res/drawable-v21/mnenomic_numpad_button.xml new file mode 100644 index 0000000..af4c22e --- /dev/null +++ b/app/src/main/res/drawable-v21/mnenomic_numpad_button.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable-v21/numpad_highlighted.xml b/app/src/main/res/drawable-v21/numpad_highlighted.xml new file mode 100644 index 0000000..2c00338 --- /dev/null +++ b/app/src/main/res/drawable-v21/numpad_highlighted.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/numpad_highlighted_four.xml b/app/src/main/res/drawable-v21/numpad_highlighted_four.xml new file mode 100644 index 0000000..87ce8d9 --- /dev/null +++ b/app/src/main/res/drawable-v21/numpad_highlighted_four.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/numpad_highlighted_three.xml b/app/src/main/res/drawable-v21/numpad_highlighted_three.xml new file mode 100644 index 0000000..05aa808 --- /dev/null +++ b/app/src/main/res/drawable-v21/numpad_highlighted_three.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/ic_star_accent_48dp.png b/app/src/main/res/drawable-xhdpi/ic_star_accent_48dp.png new file mode 100644 index 0000000..d8bbfa1 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_star_accent_48dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_star_grey_48dp.png b/app/src/main/res/drawable-xhdpi/ic_star_grey_48dp.png new file mode 100644 index 0000000..55661b2 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_star_grey_48dp.png differ diff --git a/app/src/main/res/drawable/button_inactive.xml b/app/src/main/res/drawable/button_inactive.xml new file mode 100644 index 0000000..523ab80 --- /dev/null +++ b/app/src/main/res/drawable/button_inactive.xml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/button_standalone.xml b/app/src/main/res/drawable/button_standalone.xml new file mode 100644 index 0000000..8f125d3 --- /dev/null +++ b/app/src/main/res/drawable/button_standalone.xml @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_star_grey_36dp.xml b/app/src/main/res/drawable/ic_star_grey_36dp.xml deleted file mode 100644 index 456adf1..0000000 --- a/app/src/main/res/drawable/ic_star_grey_36dp.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_trophy_award_black_48dp.png b/app/src/main/res/drawable/ic_trophy_award_black_48dp.png new file mode 100644 index 0000000..e85ed53 Binary files /dev/null and b/app/src/main/res/drawable/ic_trophy_award_black_48dp.png differ diff --git a/app/src/main/res/drawable/ic_trophy_black_48dp.png b/app/src/main/res/drawable/ic_trophy_black_48dp.png new file mode 100644 index 0000000..7d1620f Binary files /dev/null and b/app/src/main/res/drawable/ic_trophy_black_48dp.png differ diff --git a/app/src/main/res/drawable/mnenomic_numpad_button.xml b/app/src/main/res/drawable/mnenomic_numpad_button.xml index af4c22e..12c4d14 100644 --- a/app/src/main/res/drawable/mnenomic_numpad_button.xml +++ b/app/src/main/res/drawable/mnenomic_numpad_button.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/res/drawable/numpad_highlighted.xml b/app/src/main/res/drawable/numpad_highlighted.xml index 2c00338..7af2c1a 100644 --- a/app/src/main/res/drawable/numpad_highlighted.xml +++ b/app/src/main/res/drawable/numpad_highlighted.xml @@ -2,10 +2,10 @@ + android:endColor="@color/lightblue" + android:startColor="@color/lightblue" /> + android:color="@color/colorPrimaryDark" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/numpad_highlighted_four.xml b/app/src/main/res/drawable/numpad_highlighted_four.xml index 87ce8d9..8b8e766 100644 --- a/app/src/main/res/drawable/numpad_highlighted_four.xml +++ b/app/src/main/res/drawable/numpad_highlighted_four.xml @@ -2,10 +2,10 @@ + android:endColor="@color/lightblue" + android:startColor="@color/lightblue" /> + android:color="@color/black" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/numpad_highlighted_three.xml b/app/src/main/res/drawable/numpad_highlighted_three.xml index 05aa808..fe0f0cf 100644 --- a/app/src/main/res/drawable/numpad_highlighted_three.xml +++ b/app/src/main/res/drawable/numpad_highlighted_three.xml @@ -2,10 +2,10 @@ + android:endColor="@color/lightblue" + android:startColor="@color/lightblue" /> + android:color="@color/yellow" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ratingbar.xml b/app/src/main/res/drawable/ratingbar.xml index b634ced..a461706 100644 --- a/app/src/main/res/drawable/ratingbar.xml +++ b/app/src/main/res/drawable/ratingbar.xml @@ -1,27 +1,12 @@ - - - - - - - - - - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_about.xml b/app/src/main/res/layout-land/activity_about.xml index b36a20c..818a033 100644 --- a/app/src/main/res/layout-land/activity_about.xml +++ b/app/src/main/res/layout-land/activity_about.xml @@ -1,5 +1,6 @@ + app:srcCompat="@drawable/secuso_logo_blau_blau" /> - + android:background="@drawable/button_standalone"/>