preferences

saving eclipse perspective layout and other things

若如初见. 提交于 2019-12-02 15:53:40
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 order to have my setup as I have before, specially in my case (there are probably other things): I have to add the Perspectives I use and remove the ones I don't I have to configure the layout of those Perspectives (specially java one, to use properly two monitors). Add a bugzilla task repostiry for mylyn, and configure a couple of queries Is there a way

Managing configurations in java (initial config / save/load config)

我们两清 提交于 2019-12-02 11:47:49
问题 I got a class Config wich looks like that: public Class Config { public static int someIntValue = 0; public static String someText = "some text"; } What i want to do now is saving and loading that config and there is also that inital config if there is no need to load another. So the config can change at any point in the programm. What i came up with was a Singelton like pattern public Class Config { public static Config instance; private int someIntValue = 0; private int String someText =

Android: Scrollable preferences window with custom list view

自作多情 提交于 2019-12-02 08:48:01
I have an activity with a listview that gets populated with preferences from an xml file, then another listview that gets populated by data in my database, then a textview and a edittext. I want every element (including all the list views) on the screen to take their full height, and the entire screen be scrollable, but I cannot figure out how to do this! Below is my xml: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android

Android libgdx preferences not working

て烟熏妆下的殇ゞ 提交于 2019-12-02 08:14:17
问题 Probably a stupid question, but what do I have to change to make this code work: package com.hobogames.WizardsDuel; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; public class GameData { public static String version = "1.0.0"; public static String data[] = {"version"}; public static final int VERSION = 0; public static Preferences prefs = Gdx.app.getPreferences("WizWars"); public static boolean played = (!prefs.get().isEmpty()); public static String getString(int key){

Saving user settings from GUI

帅比萌擦擦* 提交于 2019-12-02 07:49:02
问题 I am currently coding an application, which has an option frame JDialog . This frame contains various checkboxes and text fields that the user can configure. I want to save the changes the user made to the options. What is the best way of doing so? My first thought was implementing it by saving it in a file with the format of e.g. checkBox1=value; textArea1="value"; By using the following I could get the field, but I would need to do something like (for the checkbox) myField.isSelected();

Managing configurations in java (initial config / save/load config)

青春壹個敷衍的年華 提交于 2019-12-02 06:34:53
I got a class Config wich looks like that: public Class Config { public static int someIntValue = 0; public static String someText = "some text"; } What i want to do now is saving and loading that config and there is also that inital config if there is no need to load another. So the config can change at any point in the programm. What i came up with was a Singelton like pattern public Class Config { public static Config instance; private int someIntValue = 0; private int String someText = "some text"; public static Config getInstance(){ if(instance == null) instance = new Config(); return

How can I keep on adding preferences when i click one?

↘锁芯ラ 提交于 2019-12-02 06:17:44
I have a problem. I want to give a user freedom to select a number of Bluetooth devices in my app. Now I dont know how many Bluetooth devices will there be so I was wondering is it possible to give user an option to click on "Add a new Bluetooth Device" custom preference and open up a new preference screen for him to select Bluetooth setting of new device? In summary the display would look like: Add a new Bluetooth Device.. If user adds one, it should then look like: Bluetooth Device 1 Add a new Blutooth Device.. If user adds another one it should look like: Bluetooth Device 1 Bluetooth Device

Objective-C NSUserDefaults caching prevents another app from accurately reading changes

拜拜、爱过 提交于 2019-12-02 01:38:52
I have one application that sets preferences. It uses those prefs, and so does another application. When I use the following code in the second application, it reads the preferences correctly once. NSUserDefaults* settings = [NSUserDefaults standardUserDefaults]; [settings addSuiteNamed:@"com.WVS.Wrestling-Tools"]; [settings synchronize]; // this just a shot in the dark.. didn't work [self setScoreboardIndex:[settings integerForKey:@"matName"]]; On subsequent calls of the same code, I get the [settings integerForKey:@"matName"] is always the value that was first read. In the first application,

Adding a button to an iPhone prefs / settings bundle?

微笑、不失礼 提交于 2019-12-01 20:52:35
问题 Just wondering if it's possible to add a button like the "Clear History", "Clear Cookies" etc buttons in the Safari preferences to your own app's settings bundle? Been digging through the dev docs and can't find any plist specifier for a button, so I'm wondering if this is an internal API for the Apple guys? After you hit the button, you get an action sheet asking you whether you really want to do it, and then presumably there is some callback based on the user's input. Also noticed that the

Adding a button to an iPhone prefs / settings bundle?

断了今生、忘了曾经 提交于 2019-12-01 18:50:36
Just wondering if it's possible to add a button like the "Clear History", "Clear Cookies" etc buttons in the Safari preferences to your own app's settings bundle? Been digging through the dev docs and can't find any plist specifier for a button, so I'm wondering if this is an internal API for the Apple guys? After you hit the button, you get an action sheet asking you whether you really want to do it, and then presumably there is some callback based on the user's input. Also noticed that the Nike + iPod settings have a clear button in them, but again, that app might have access to internal