From 63912ffbe77814a679f2d6ae1486327503c3b9af Mon Sep 17 00:00:00 2001 From: Christopher Beckmann Date: Mon, 5 Oct 2020 18:37:31 +0200 Subject: [PATCH] Fixed broken continue game item entry Fixed custom games not being flagged as custom when using links --- .../ui/GameActivity.java | 6 +- app/src/main/res/layout/list_entry_layout.xml | 175 +++++++++--------- 2 files changed, 91 insertions(+), 90 deletions(-) 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 2016e4a..31a5f0d 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java @@ -188,7 +188,7 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig } else if (data.getHost().equals(validUris.get(i).getHost())) { input = data.getPath(); - input =input.replace("/", ""); + input = input.replace("/", ""); break; } } @@ -200,7 +200,9 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig QQWing difficultyCheck; GameInfoContainer container = new GameInfoContainer(0, GameDifficulty.Unspecified, GameType.Unspecified, new int [boardSize], new int [boardSize], new boolean [boardSize][sectionSize]); - container.setCustom(extras != null && extras.getBoolean("isCustom", false)); + // always set custom sudokus as custom + // TODO: maybe introduce a setting in the settings page to let the user decide + container.setCustom(true); try { container.parseGameType("Default_" + sectionSize + "x" + sectionSize); diff --git a/app/src/main/res/layout/list_entry_layout.xml b/app/src/main/res/layout/list_entry_layout.xml index 23a94ed..585d6f6 100644 --- a/app/src/main/res/layout/list_entry_layout.xml +++ b/app/src/main/res/layout/list_entry_layout.xml @@ -1,5 +1,5 @@ - - + + + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginLeft="8dp" + android:layout_marginTop="4dp" + android:text="GameType" + app:layout_constraintEnd_toEndOf="@+id/loadgame_listentry_difficultytext" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toEndOf="@+id/loadgame_listentry_gametypeimage" + app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - - - - - - - + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginLeft="16dp" + android:text="@string/difficulty_custom" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="@id/loadgame_listentry_gametype" + app:layout_constraintStart_toEndOf="@id/loadgame_listentry_gametype" + app:layout_constraintTop_toTopOf="@id/loadgame_listentry_gametype" /> - + - + - + - \ No newline at end of file + + +