From e4810fefe981451eaeabc786628e156f63307a08 Mon Sep 17 00:00:00 2001 From: GitGitro <108683123+GitGitro@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:56:36 +0200 Subject: [PATCH] New version, fix deal one modes and show timer again --- app/build.gradle | 4 ++-- .../java/net/sourceforge/solitaire_cg_re/DrawMaster.java | 4 ++-- app/src/main/java/net/sourceforge/solitaire_cg_re/Modes.java | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0531cab..f8c4220 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "net.sourceforge.solitaire_cg_re" minSdkVersion 23 targetSdkVersion 35 - versionCode 5000 - versionName "5.0.0" + versionCode 5100 + versionName "5.1.0" } buildTypes { diff --git a/app/src/main/java/net/sourceforge/solitaire_cg_re/DrawMaster.java b/app/src/main/java/net/sourceforge/solitaire_cg_re/DrawMaster.java index 401c699..80301aa 100644 --- a/app/src/main/java/net/sourceforge/solitaire_cg_re/DrawMaster.java +++ b/app/src/main/java/net/sourceforge/solitaire_cg_re/DrawMaster.java @@ -1117,9 +1117,9 @@ public void DrawTime(Canvas canvas, int millis) { } } mTimePaint.setARGB(255, 20, 20, 20); - canvas.drawText(mTimeString, mScreenWidth-9, mScreenHeight-9, mTimePaint); + canvas.drawText(mTimeString, mScreenWidth-9, mScreenHeight-200, mTimePaint); mTimePaint.setARGB(255, 0, 0, 0); - canvas.drawText(mTimeString, mScreenWidth-10, mScreenHeight-10, mTimePaint); + canvas.drawText(mTimeString, mScreenWidth-10, mScreenHeight-200, mTimePaint); } public void DrawAltMenuString(Canvas canvas, int gameType, String text) { diff --git a/app/src/main/java/net/sourceforge/solitaire_cg_re/Modes.java b/app/src/main/java/net/sourceforge/solitaire_cg_re/Modes.java index 071c018..83291ef 100644 --- a/app/src/main/java/net/sourceforge/solitaire_cg_re/Modes.java +++ b/app/src/main/java/net/sourceforge/solitaire_cg_re/Modes.java @@ -4,6 +4,7 @@ import android.app.Activity; import android.content.SharedPreferences; import android.os.Bundle; +import android.preference.PreferenceManager; import android.view.View; import android.widget.Button; @@ -38,8 +39,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { Button buttonGolfWrapcards = modesView.findViewById(R.id.button_golf_wrapcards); - final SharedPreferences settings = getSharedPreferences("YourPreferences", MODE_PRIVATE); - final SharedPreferences.Editor editor = settings.edit(); + final SharedPreferences mSettings = PreferenceManager.getDefaultSharedPreferences(this); + final SharedPreferences.Editor editor = mSettings.edit(); buttonBlackWidow.setOnClickListener(v -> {