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
28
votes
4 answers

ListPreference dependency

I have a ListPreference which look something like this:
shuwo
  • 453
  • 2
  • 6
  • 10
27
votes
4 answers

Android: application-wide font-size preference

Is it possible to make an application-wide setting for the font-size to be used by all views displaying text? I would like to provide a Preference to the user which should allow scaling all text in the app. Android explicitly allows using the "sp"…
ge0rg
  • 1,816
  • 1
  • 26
  • 38
26
votes
10 answers

Sublime 3 toggle comment command doesn't work in Windows

I've edited the file Preferences > Key Bindings User, and added this: [ { "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },…
Funny Frontend
  • 3,807
  • 11
  • 37
  • 56
26
votes
2 answers

How to make Sublime Text 3 opening your last file/folder when started?

I'm on Mac running Yosemite. I use Sublime Text 3. In my default Settings, I have it like this : "hot_exit": true, "remember_open_files": true, When I close a window and reopen it back, my old open files/folder didn't come back. Quit it, Reopen…
iori
  • 3,236
  • 12
  • 43
  • 78
26
votes
3 answers

How import eclipse code style to intellij idea?

I have org.eclipse.jdt.core.prefs file, which contains eclipse code style, but I can import to intellij idea only xml files, it there any way import prefs file to intellij idea?
roman-v1
  • 728
  • 1
  • 9
  • 21
26
votes
5 answers

How to create preference headers groups in Android PreferenceActivity?

I am using preference headers to create settings activity using PreferenceActivity. I am trying to divide the headers into categories/groups, like this one (there are categories Wireless & Networks, Device, Personal, ...): Anyway, even that Android…
Erveron
  • 1,908
  • 2
  • 25
  • 48
25
votes
5 answers

Android: Using Switch Preference pre API level 14

Pre-API Level 14 there is no switch preference. If I use preferences.xml to create my preference screen is there some way to distinguish between the API levels? So having a check box for old releases and a switch for API 14? What would be the best…
AndyAndroid
  • 4,039
  • 14
  • 44
  • 71
25
votes
4 answers

How to programatically open Settings/Preferences window in a macOS SwiftUI App

I have created a simple macOS-only SwiftUI app and added a Settings screen as per Apple's instructions: import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { RootView() } Settings { …
Joshua
  • 1,349
  • 15
  • 26
24
votes
3 answers

saving eclipse perspective layout and other things

every time I throw away my .metadata (due to some corruption or something) and start with a new one, first thing I do is: Import my saved preferences Load existing projects from disk BUT there are still some things I must configure manually in…
Persimmonium
  • 15,593
  • 11
  • 47
  • 78
24
votes
3 answers

How do I get preferences to work in Android?

I've really been struggling through this. New to Java/Android. I'm writing my first app and this is the first thing that has taken me longer than a couple days of searching to figure out. Here's the setup: It's a BAC calculator / drink counter: A…
Dan T
  • 487
  • 2
  • 4
  • 12
23
votes
3 answers

Cocoa button opens a System Preference page

In a OSX Cocoa app, I would like a button that would open the "speech" preference pane. Is that possible? I'm just trying to save them the time to go System Preferences > Speech > Text to Speech
Nathan H
  • 48,033
  • 60
  • 165
  • 247
23
votes
3 answers

Programmatically populating preferences with checkboxes

In my setting page I have a preference which fetches a list of toggle-able settings that I wanted to display as individual checkbox preferences. I know that preferences.xml supports generating lists of preferences (looking at wi-fi settings page)…
isep
  • 703
  • 1
  • 9
  • 24
22
votes
2 answers

Android: How do I reset/clear application preferences during unit testing?

I want to start with a consistent test environment so I need to reset/clear my preferences. Here's the SetUp for test I have so far. It's not reporting any errors, and my tests pass, but the preferences are not being cleared. I'm testing the…
21
votes
3 answers

Get preferred screen brightness in Android

How do you get the preferred screen brightness in Android? To change the screen brightness I use WindowManager.LayoutParams.screenBrightness. According to the documentation: This can be used to override the user's preferred brightness of the …
hpique
  • 119,096
  • 131
  • 338
  • 476
21
votes
4 answers

java.util.Prefs throwing BackingStoreException - Why?

I have a system that caches the tiny/simple results of an on-startup SOAP call I need instances to be able to reload their cache on startup (in case the SOAP service is dead) and ALSO handle the possibility of multiple instances using this cache…
HaveAGuess
  • 1,231
  • 1
  • 13
  • 23