preferences

Managing multiple SharedPreference files.

I'm looking for a good way to manage multiple SharedPreference files. Basically the user should be able to create, edit, and delete the preference files and then select the one they want from a spinner. What I'm trying to figure out is how do I find all of the preference files that the app has? Is there a way to scan the directory and r...

Android store array in preferences

I know only primitives can be stored in the android preferences, but do arrays count? Can I store an array of, say, Strings or booleans in an android preference? ...

Tool to easily create a wxPython preference dialog from a template ?

I need a wxPython preference dialog box from a Python application. I could hand-code it (and use wxGlade to do part of the job), but I was wondering if there is no tool that makes creation of simple preference dialog boxes easier. The 'easier' part would be in that you can specify that you need e.g. a text box, and both the GUI elements...

Can I save SharedPreferences to file so I can have multiple instances of the prefs?

I love how SharedPreferences work in android and I would like to know if there is an easy way to save them to another file so I could load a previous instance of the prefs and vice versa. Basically when you load this file, all the preferences would change to how you had it before at once. I want to be able to swap 3 or 4 different vers...

Saving state of a Window in Java/SWT

Hello, I'm trying to build a small application using Java and SWT for the GUI. I'm looking for a way to store in some file the preferences set by the user, I mean, if the window was resized then that new size should be saved for next time the application starts. The same thing with some controls like textbox and so on. I came up with t...

Java String initialization

Which do you prefer and why" String myString = null; if(someCondition) myString = "something"; else myString = "something else"; OR String myString = ""; if(someCondition) myString = "something"; else myString = "something else"; I know that using the ternary (? :) operator is possible but I'd like to know about the abo...

android sharedpreferences set value

I have preferences page. It has field 'Show info screen' (as checkbox). I have also info page which also should have checkbox 'Show me again'. As I've understand, I can get value from preferences page via PreferencesManager.getDefaultPreferences(context) ... But how I should set preferences value for the checkbox on info page? I tr...

Algorithm for picking thumbed-up items

I have a Pandora-like piece of software where the user can thumb up a song or thumb down a song. The software, called Chavah, is Silverlight + C#, but this is a language- and platform-neutral question. My software needs to choose a song based on the user's preferences. I need a good algorithm for this. I want my software to choose a so...

How to display defaultValues the first time a PreferenceActivity is started?

I've defined my preferences in an xml file, preferences.xml. I've also got a SettingsWindow class which extends PreferenceActivity. I've set the android:defaultValue attribute on my preferences in the xml file but they don't appear the first time the app is launched. How do I load the default values defined in the xml file into the Setti...

How to put Preference into a View?

I need to make a Screen with Header(Will contain ImageView and TextView) and Footer(Navigation Menu, will consists of ImageView), in the between I need to have Preference screen with all the default action like scrolling and setting preferences. Which approach should I take to achieve this? Right now, I have made a View with FrameLayou...

Platform-native preferences dialog with Qt on Mac, Gnome, KDE, and Windows

On Mac and Gnome, native applications use an application preferences dialog that immediately applies the chosen settings as they are selected. On Windows and (I think) KDE, preferences are applied only when an "Apply" or "OK" button is pressed. Are there any built-in Qt goodies to do this for you, or do you have to include several #ifde...

Programatically enabling/disabling screen rotations in Android.

I have an app which displays a large amount of text for the user to read. I've found that when reading while lying down, I get annoyed that the screen rotates even though my head and the screen are aligned. I do not want to set this to be permanently in portrait mode, so I think this would preclude an approach of setting the android...

How to add preference of Custom Input method to Android Settings app?

Hello everyone! Recently I've started to develop Android Soft Keyboard and got some problem with preferences. How to add a preferences to Android setting app? I've searched almost all the source code of AnySoftKeyboard, but haven't found anything what would add them to Settings app. I'm placing a link to show what I meant: http://cod...

android preferences

i am using a listprefernce in my app and when a user makes a selection I would like to check it for errors, but when i set an onclicklistener it starts when i select the listpreference, not when i make my selection. is there a way to make it check the selection right after they make it? ...

Using preferences in XUL

Hi, I'm trying to figure out how to use a preference (the ones you can access by going to about:config) in an XUL file. I'll have a few developers working on this and we all have different "local" hosts configured. So I'd like to make things easier for everyone by making the "example.local" part belos come from a preference setting (stri...

Android PreferenceActivity to create a MODE_WORLD_WRITEABLE preference across applications

Hi, I have multiple applications that share certain data through preferences. Each app sets its preferences through a PreferenceActitivity (from xml). Two questions: How do I use/edit preferences created by one app in another app. If I figure out how to create MODE_WORLD_WRITEABLE preferences using PreferenceActivity that will solve t...

How to save user preferences in google desktop gadget?

Hi, I want to save the user preferences in a Google Desktop Gadget. I am not able to find any documents for it. Can anyone tell me how can I do that? Thanks, Hardik ...

How do I disable Eclipse's find/search regex hint drop-down ?

When searching (across files) or finding (within files), if you have regular expressions enabled and enter a certain character (backslash, opening paren, etc) it displays a drop-down box with hints in. I don't need these hints; they get in the way of the rest of the dialog, and the stupid drop-down hijacks my home/end keys. However, I ...

Xcode Delete File Dialog

Whenever I delete a file in xcode, it normally automatically deletes the reference only, and leaves the real file intact on the hard drive. Sometimes though, when I delete files straight after I create them from a template, a more extensive window appears asking me if I want to delete the reference or the file itself & references. Does...

Make Preference look disabled, but still register clicks

So during certain states in my app, I want to disable certain CheckBoxPreferences in my setting-menu. However, if the user clicks them, I want an explanatory toast to be shown. If i just do setEnable(false); on the CheckBoxPreference, I do get the right look and feel. But I cant get a toast to be shown on click. On the other hand, I have...