Skip to content

Commit

Permalink
Merge pull request #137 from SecUSo/development
Browse files Browse the repository at this point in the history
[fix] Crashes in Landscape
  • Loading branch information
coderPaddyS authored Jan 14, 2025
2 parents 3cdac68 + 10795de commit 8ddad15
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId "org.secuso.privacyfriendlysudoku"
minSdkVersion 17
targetSdkVersion 34
versionCode 17
versionName "3.2.2"
versionCode 18
versionName "3.2.3"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ public void onPageSelected(int position) {
GameType gameType = GameType.getValidGameTypes().get(mViewPager.getCurrentItem());
int index = difficultyBar.getProgress()-1;
GameDifficulty gameDifficulty = GameDifficulty.getValidDifficultyList().get(index < 0 ? 0 : index);
Button button = findViewById(R.id.playButton);
if (gameType == GameType.Default_16x16 && index <= 2) {
button.setEnabled(false);
button.setText(R.string.game_config_unsupported);
button.setBackgroundResource(R.drawable.button_inactive);
} else {
button.setEnabled(true);
button.setText(R.string.new_game);
button.setBackgroundResource(R.drawable.button_standalone);
}
((TextView) findViewById(R.id.level_count))
.setText(String.format(getString(R.string.levels_available), newLevelManager.getCountAvailableLevels(gameType, gameDifficulty)));
}
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout-land/activity_main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@

</androidx.constraintlayout.widget.ConstraintLayout>

<TextView android:id="@+id/level_count"
android:text="Levels available:"
android:textStyle="bold"
android:textSize="14dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<Button
android:textColor="?attr/lightestFontColor"
android:layout_width="match_parent"
Expand Down

0 comments on commit 8ddad15

Please sign in to comment.