Questions tagged [preferences]

The java.util.prefs package provides a way for applications to store and retrieve user and system preference and configuration data.

1531 questions
8
votes
2 answers

How to store preferences (and user settings) in a cross-platform application?

I'm working on a GUI desktop application that should run natively on Windows, Mac OS X and Linux. What is the preferred way to store preferences in a cross-platform application? I'm using C++, but the question (and its answers) should be valid for…
z80crew
  • 1,150
  • 1
  • 11
  • 20
8
votes
1 answer

Algorithm for preference based grouping

I am looking to figure out a way to sort people into classes by preference. For example, say there are 100 students that are each going to be assigned one of five classes: Science - 40 seats Math - 15 seats History - 15 seats Computers - 20…
user2338460
  • 81
  • 1
  • 2
8
votes
4 answers

Switch Preference - Handling both onPreferenceChange and onPreferenceClick

I've been trying to get a switch preference working in Android whereby I can intercept and handle differently, in certain cases, when they switch it on/off vs when they click the whole preference. This is what I'm trying to accomplish: User goes…
forevercrashed
  • 135
  • 1
  • 1
  • 8
8
votes
4 answers

Change Preference Screen background color

I change color PreferenceScreen with this code.But how get Preference Screen in main Preference activity and change Preference Screen color ??? getListView().setBackgroundColor(Color.TRANSPARENT); …
D.D.M.
  • 117
  • 1
  • 1
  • 9
8
votes
8 answers

How to store variables/preferences in Python for later use

I'm working on a program in Python for Windows, and would like to save variables and user preferences so that I can recall them even after the program has been terminated and restarted. Is there an ideal way to do this on Windows machines? Would…
Parker
  • 8,539
  • 10
  • 69
  • 98
7
votes
3 answers

How get selected option from ListPreference?

I have ListPreference and it contains for example 5 options and I want to save one of this value to SharedPreferences when user selects it. How can I do it? btw. I know how to save value to SharedPreferences, but I don't know how to get that value…
Adam
  • 2,152
  • 4
  • 35
  • 45
7
votes
1 answer

Java Swing save and load workspace/settings

I have a Java Swing application that contains a bunch of frames which in turn predominantly contains tables that display large amounts of data. Since it is always a hassle and its time consuming to arrange all windows and tables on startup, I would…
hgus1294
  • 747
  • 14
  • 26
7
votes
1 answer

Java Swing Mac OSX Preferences Menu

I'm trying to add the Preferences menu to my Java Swing application and it's proving a bit of a nause. I have read many posts and articles on this and it sounds easy but... I see references to com.apple.eawt.Application in the examples I have found…
Lyndon
  • 573
  • 6
  • 24
7
votes
1 answer

Getting WinForms menus and toolbars to use the system theme?

Is there a way to get WinForms controls MenuStrip and ToolStrip to rendering using the current system theme? Normally the WinForms MenuStrip and ToolStrip controls have a RenderMode property, which points to a class that handles the…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
7
votes
2 answers

Java Preferences doesn't work in Windows 7

Recently I build an Java application. I use Java Preferences to store some information. When I ran my application in windows XP, the application run perfectly. I can store information and get the stored information. But when I ran it in Windows 7,…
Lhuqita Fazry
  • 291
  • 4
  • 12
7
votes
2 answers

Preferences without deprecated methods

I'm trying to (correctly) implement a preferences screen, but the problem is that all the methods used to read preferences from xml files are deprecated (or I just don't recognize them). The official sample code on the dev site (PreferenceActivity)…
SBoss
  • 8,845
  • 7
  • 28
  • 44
7
votes
4 answers

Showing preference screen first time app is run and related questions

I have an app with 2 activities, the preference and the main activity, I need the preference screen to show first time the app is run so the user can do some configuration. I have checked through the answers on this topic and they don't seem very…
Amanni
  • 1,924
  • 6
  • 31
  • 51
7
votes
4 answers

Android Get Keys from preferences.xml

I have a PreferencesActivity that shows a preferences.xml with checkboxes. preferences.xml:
liquid
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

starting an activity from preferences.xml

I'm trying to go to the settings screen found at - android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS From an entry in my preferences activity but am having no luck. At the moment, pressing the entry just refreshes the same screen as I was…
qubz
  • 760
  • 3
  • 11
  • 20
7
votes
1 answer

How to make SharedPreferences from a PreferenceActivity be set to default in Android?

I have created a PreferenceActivity based on xml for PreferenceScreen. In the xml you can assign default values to the different preferences. But these are not stored in my SharedPreferences before the screen is opened and closed. The problem is…
Gober
  • 3,632
  • 3
  • 26
  • 33