preferences

How to deploy a Java Swing application with an embedded JavaDB database?

I have implemented an Java Swing application that uses an embedded JavaDB database. The database need to be stored somewhere and the database tables need to be created at the first run. What is the preferred way to do these procedures? Should I always create the database in the local directory, and first check if the database file exist...

How can I write System preferences with Java? Can I invoke UAC?

How can I write system preferences with Java, using Preferences.systemRoot()? I tried with: Preferences preferences = Preferences.systemRoot(); preferences.put("/myapplication/databasepath", pathToDatabase); But I got this error message: 2010-maj-29 19:02:50 java.util.prefs.WindowsPreferences openKey VARNING: Could not open windows ...

Is it possible to load ListPreference items from an adapter?

I'm setting out to create a settings activity for my app. I've defined a PreferenceActivity with a nice layout including a ListPreference object for the user to select a bluetooth device. I'm having trouble dynamically populating the list. I would like to populate ListPreference with values from an array adapter (which I'll create and p...

Problem with Xcode and iPhone preference files

Hi, I created four language files for my app: two for the preferences and two for the strings. I added them into Xcode and it works great on the phone but the string files are shown as "Localizable.strings (de)" and "Localizable.strings (en)", while I have two files called "Root.plist" under the "Settings.bundle" in the groups "de.lproj...

Force close message when preferences are called via menu button

I see no problem in the code. Help? preferences.xml <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"&gt; <ListPreference android:title="Gender" android:summary="Are you male or female?" android:key="genderPref" android:defaultValue="male" android:entries="@array/gende...

How do I get a preference to correlate to a variable?

I have my menu button bringing up a Settings option, which brings up numerous ListPreferences such as weight and various sizes for glasses (it's a BAC calculator app). I'll pick one example... weight will work. Depending on how much you weigh it will affect your BAC. I have a int for Weight, set at 180. I would like someone to be able t...

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 formula is used to calculate the BAC. Here's the forumla: Bac = ((StandardDrinks / 2) * ...

iphone: accessing the preferences localization file from code

I was just facing the following problem and couldn't find a solution for it. Hopefully someone could help. The app I am working on has some preferences, which are using a localization file. Now I want to use labels in my app, which display the exact names, which are used in the localization file for the preferences. But I couldn't find ...

Java preferences API throughput

I'm using Java Preferences API to store window position and size of Swing application. At this moment, I'm listening to window resize/reposition events and storing the position and size every time they change. However, that means that if user slowly resizes window which is 200px wide to 400px wide, I'll probably write new window size abo...

Android ==> Preference ???

my app crashes with a null pointer exception on the code below. i have an xml preference file under res/xml/defaults.xml Any idea why it's crashing? public class Preference extends Activity { public Preference() { } public String getPreference(String key) { //it still crashes here SharedP...

Is it possible to display a DialogPreference without showing a PreferenceScreen?

I'm currently writing a live wallpaper for Android and it has a PreferenceScreen which currently contains only one preference - a DialogPreference to set various properties of animation. User workflow to configure it currently looks like this: Settings... => (shows the preferences list with only one title ) Animation speed => MyDialogPr...

Reacting to a click on a preference

I have a simple preference (not EditText preference or ListPreference). I have a method that deletes all files in a directory. I want to do this when user clicks on a preference, but i don't know how to react to a click on a preference. ...

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 preferences of my app. What is the best way to manage my app config preferences? Should I c...

User preferences in JEE application

I have a growing web application which now needs to be able to store user and system preferences / settings. In the past I've always rolled my own preferences system for web applications but I was wondering what other people do to solve this problem? Are there any preference libraries for web applications that people could recommend? Id...

update view when preference changed in PreferenceActivity.onResume (Android)

I'm trying to keep a boolean preference in sync with a value in a content provider, and succeeding nicely except for this issue. When I set the preference in my PreferenceActivity's onResume() method (because the value may have been changed in the content provider), the checkbox in the view still reflects the pre-onResume value. As far...

how can i view my android app preferences in eclipse

I can access the preferences and add and change them. How can I view the entire file that stores the keys and values for sharedpreferences in my app. I have changed, added and removed some keys from my code and would like to see the effect on the preference file. ...

netbeans: how to markup variable in scroller in whole editor

Hi, I am trying to find out the great Eclipse feature of 'marking all occurrences of selected word in the right-scroller' in NetBeans 6.9. So I will be able to click the occurrence quickly. Same as there are marks for functions by default in NetBeans. I am not native english speaker, so maybe the right naming of this feature will be en...

Android Preferences: Unlimited, extensible value-list

Hello, I would like to allow the user to enter (a non-predetermined amount of) values for an Android application preference. Existing examples that come to mind are the alarm clock applications found on various smartphones (iPhone, HTC Android, ...) where the user can add an alarm clock time.* Can anyone think of a simple way to presen...

Place boolean function in if statement expression

I'm maintaining a VB6 app. For boolean functions, the original authors store the return value in a boolean variable before checking the result in an If Statement. I prefer to place the function directly in the If Statement. Is this a matter of preference or am I missing a potential pitfall in my style? Original Author Style bRetur...

Individual Preferences for each item in a ListView?

Hi everyone, I'm creating my first android app (or attempting to anyway) and i have a question i can't seem to find the answer to. I would like to allow users to enter a separate set of preferences for each item in a list view. I have the PreferenceScreen working, but it maintains the same preferences for every item (i.e. changing 1 i...