preferences

ListPreference summary not formatting

一世执手 提交于 2019-12-23 05:29:09
问题 I have a ListPreference and I want to show the current entry in the summary. According to the docs for ListPreference.getSummary(), I'm supposed to be able to do this by including %s in the summary string. Unfortunately, the activity just displays the %s in the summary. The XML is pretty standard: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <ListPreference android:key="displayMode" android:summary="@string/display_mode

Open application settings via Intent from preferences.xml

一个人想着一个人 提交于 2019-12-22 11:15:15
问题 I would like to open the application settings by clicking on a preferences entry. So I added an intent to the preferences.xml <PreferenceScreen android:key="DELETE_DATA" android:title="@string/pref_delete_data"> <intent android:action="android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS"/> </PreferenceScreen> and I've added an Intent-filter to the AndroidManifest.xml <activity android:name=".SettingsActivity" android:label="@string/title_activity_settings" android:parentActivityName

Android PreferenceActivity to create a MODE_WORLD_WRITEABLE preference across applications

不打扰是莪最后的温柔 提交于 2019-12-22 11:07:44
问题 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 the problem. SharedPreferences prefs = getSharedPreferences( <String referring to another package´s prefs>, MODE_WORLD_WRITEABLE); HashMap<String, String> map =

Can't save my Preferences after app killed

依然范特西╮ 提交于 2019-12-22 09:55:30
问题 Hi I'm trying to implement a settings page on my Android App. I defined a xml Preference file, where I implemented CheckBoxPreference and EditTextPreference. All the settings work perfectly while running the app, but when I kill it I lose all the settings. Preference.xml file: <PreferenceCategory android:title="Connection"> <CheckBoxPreference android:title="Auto Log-In" android:summary="Auto connect " android:key="autoLogIn" android:enabled="true" android:selectable="true"/>

Why doesn't VS 2008 IDE remember my preferences?

限于喜欢 提交于 2019-12-22 07:59:48
问题 This is a very petty question that I'm only asking while compiling... ;) For some reason my VS 2008 IDE doesn't remember my window preferences when I close & reopen - it resets the window widths, locations, appearances etc. Where's the secret switch so that my IDE stays looking the way I want it? 回答1: Try resetting the Visual Studio Tools->Import and Export Settings->Reset All Settings Or devenv.exe /resetsettings 回答2: The window positions are stored in the following file: %APPDATA%

How to return from preference screen to main activity?

感情迁移 提交于 2019-12-22 06:49:55
问题 I have one main activity and one preferenceActivity. On my first activity I call menu and go on preferenceActivity by calling startActivityForResult. case R.id.settings: startActivityForResult(new Intent(this, SettingsActivity.class), LAUNCH_SETTINGS); return true; Then I change my settings and want to return on main activity and see main activity with new settings applyed. In onPause() method do following (as I right understand this method will be called when I press back button, right?)

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

血红的双手。 提交于 2019-12-21 20:38:38
问题 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 #ifdef 's in the dialog code to handle this ( Q_WS_WIN , Q_WS_MAC , Q_WS_X11 )? If you have done something like this before (even using #ifdef 's), could you share

How to use PreferenceFragment?

筅森魡賤 提交于 2019-12-21 19:10:26
问题 i am trying to use PreferenceFragment calling it from an Activity when i click an icon from my ActionBar, I simply call the FragmentPreferences whit Intent: case R.id.settings: Intent prefs = new Intent(this, LogicAnalizerPrefs.class); startActivity(prefs); break; On this way when i click my icon the application simple stucks, i mean it doesnt crash and nothing strange on LogCat simple stucks and if i click again i get ANR. If i use instead: getFragmentManager().beginTransaction().replace

How to configure java.util.logging.logger in android to use a logging properties file placed on the sdcard?

一世执手 提交于 2019-12-21 17:19:37
问题 I have been trying to use java.util.logging.logger to log stuff on to a file on sdcard. Now, I want the logger to use a logging configuration/properties file that I will provide on the sdcard. One way that I have been trying is:- I have been trying to use logmanager and java.util.prefs.preferences, but I get the BackingStoreException-->AccessPermission Exception perculating down to an error message that .java/.userprefs/path represented by str/prefs.xml was not found. private void

What linux distro is better suited for Python web development?

泄露秘密 提交于 2019-12-21 13:11:25
问题 Which linux distro is better suited for Python web development? Background: I currently develop on Windows and it's fine, but I am looking to move my core Python development to Linux. I'm sure most any distro will work fine, but does anyone have any reasons to believe one distro is better than another? 回答1: Largely distribution won't matter, as Python is present and largely self sufficient on virtually all Linux distributions. If you're wanting to focus on development, I'd recommend Ubuntu.