The java.util.prefs package provides a way for applications to store and retrieve user and system preference and configuration data.
Questions tagged [preferences]
1531 questions
10
votes
2 answers
Loading layout in onCreateView for custom preference
Can I load layout from xml during onCreateView call, I tried:
setLayoutResource(R.layout.test);
setWidgetLayoutResource(R.layout.test);
it crashes and I don’t know what to return a ViewGroup parent from a method arguments?
I also tried:
View…

michael
- 3,250
- 10
- 43
- 58
10
votes
4 answers
Eclipse console exception color
This seems simple enough, but I can't seem to find the setting in Eclipse to change this setting.
I prefer my consoles to have dark colors with white text. I leave the print to stderr as the red default.
My problem lies in when I receive an…

Scott
- 9,458
- 7
- 54
- 81
10
votes
3 answers
How to refresh Sublime Text 3 workspace color schemes?
When you save a project, Sublime Text will create a .sublime-workspace file. In this file, there is an array of buffers, and for each buffer there is a color_scheme property. This is set to whatever color scheme was chosen when the buffers and…

Sam
- 6,414
- 11
- 46
- 61
10
votes
1 answer
onPreferenceChange method isn't called when Listpreferences changes
I have a Preferences Activity in my code.
I want to show a toast when ever user change radio button in a ListPreferences.
I used this code but it does not work. :(
public class PrefsActivity extends PreferenceActivity implements…

Reza_Rg
- 3,345
- 7
- 32
- 48
10
votes
4 answers
android:visibility attribute in preferences xml not working? (Android 2.3)
Take for example this small preference.xml file:

BlooregardQKazoo
- 103
- 1
- 1
- 5
9
votes
2 answers
Extras on Email Intent - Preferences XML
I'm wanting to trigger an Email from my xml preferences screen and also attach a pre-defined subject and start the cursor in the Body field of the email application
Here's what I've got so far

jondavidjohn
- 61,812
- 21
- 118
- 158
9
votes
0 answers
How to use preference datastore in Application Class in JetPack Compose Android to Change theme?
I have set up the theme for my android application using jetpack compose. I have declared my variable in the Application class (TranslateApplication) as
val isDark = mutableStateOf(false)
I am using this value in my MainActivity.kt Such as
…

MRazaImtiaz
- 1,964
- 1
- 13
- 23
9
votes
3 answers
Docker-desktop for MacOs can't add /usr/local folder in Preferences/File-Sharing
I'm using Docker Desktop vrs 2.1.1.0 (edge channel) on Mac Os Mojave. I need to include a file from /usr/local folder, as shared file in Docker's preferences, but the /usr folder is not displayed while browsing the folders. The option to write the…

Vlad Barjovanu
- 103
- 1
- 6
9
votes
2 answers
Java Preferences and Internationalization (i18n)
The Java tutorials recommend using the Preferences API over Properties files.
Properties files and ResourceBundles are the recommended way to handle Internalization requirements in applications.
I am considering using both for a desktop application…

user697750
- 93
- 5
9
votes
0 answers
How to make a custom DialogPreference using Android x?
With Android x the DialogPreference is moved to DialogPreferenceCompat . As there are many ways to make a custom layout in the Preference settings .
I am looking for more clean and better way to make a custom layout that when clicked opens the…

Ravi Parmar
- 968
- 11
- 28
9
votes
1 answer
Nested PreferenceScreens under a dynamic list of preferences on Android
I'm trying to create a preferences screen with a dynamic list of entries, and when clicking each of them, I have another screen of preferences.
As an example, think of a list of mail accounts and each one having their account settings…

Deanna
- 23,876
- 7
- 71
- 156
9
votes
2 answers
How to customize preferences screen theme to look like that?
Ok, I have a Preferences activity set with an XML layout.
Here I have a couple of Preferences that open some dialogs. On these preferences I want to have an arrow on the right of them like in the screenshot. How I do this, is something related to…

Alex
- 2,213
- 4
- 32
- 44
9
votes
4 answers
What's the proper way to set up an Android PreferenceFragment?
I'm trying to implement a basic settings activity in an Android app and either get a blank white screen or a crash. The documentation and samples I've seen aren't helping because they're either old or inconsistent. For example, depending on where…

Phil
- 1,030
- 1
- 16
- 22
9
votes
1 answer
How to dynamically add preferences into preferences screen and bind their values?
I'm new in Android.
In my app i want to do something like this:
I have a container and i want to add item dynamically to it, in one item there may be some fields, so tree would be like this:
main container
- item 1
--field 1
--field 2
…

frank
- 105
- 1
- 6
9
votes
3 answers
User preferences file vs App preferences file
My android application has two kinds of preferences:
1) I have user preferences defined in res/xml/preferences.xml so that users can manage their preferences with a PreferenceActivity.
2) I'd like to define another file for global configuration…
user332563