Skip to content

Commit

Permalink
Fix preferences, remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGitro committed Jan 6, 2025
1 parent 56a85ad commit 7386536
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ android {
applicationId "net.sourceforge.solitaire_cg_re"
minSdkVersion 23
targetSdkVersion 35
versionCode 5200
versionName "5.2.0"
versionCode 5210
versionName "5.2.1"
}

buildTypes {
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/net/sourceforge/solitaire_cg_re/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
import android.content.SharedPreferences;
import android.os.Bundle;
import android.content.pm.ActivityInfo;
import android.preference.PreferenceManager;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebView;
import net.sourceforge.solitaire_cg_re.BuildConfig;

public class Help extends Activity {

Expand Down
8 changes: 7 additions & 1 deletion app/src/main/java/net/sourceforge/solitaire_cg_re/Modes.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@

public class Modes extends Activity {

private SharedPreferences mSettings;
public SharedPreferences GetSettings() { return mSettings; }

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

mSettings = PreferenceManager.getDefaultSharedPreferences(this);
mSettings = getSharedPreferences("SolitairePreferences", 0);

setContentView(R.layout.modes);
View modesView = findViewById(R.id.modes_view);
modesView.setFocusable(true);
Expand All @@ -39,7 +45,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Button buttonGolfWrapcards = modesView.findViewById(R.id.button_golf_wrapcards);


final SharedPreferences mSettings = PreferenceManager.getDefaultSharedPreferences(this);

final SharedPreferences.Editor editor = mSettings.edit();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import android.content.SharedPreferences;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.RadioButton;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.TextView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@
import android.os.Bundle;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Gravity;
import android.view.Surface;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import android.widget.Toast;

Expand Down

0 comments on commit 7386536

Please sign in to comment.