preferences

How to apply InputFilter to EditTextPreferences?

亡梦爱人 提交于 2019-12-11 05:25:43
问题 I want to apply InputFilter to my EditTextPreferences... Before I used the PreferenceActivity I had EditTexts with Filters like that: et1 = (EditText) findViewById(R.id.editText1); et2 = (EditText) findViewById(R.id.ETminsim); et3 = (EditText) findViewById(R.id.ETdelay); et1.setText(Integer.toString(PlotView.playlist_size), EditText.BufferType.EDITABLE); et2.setText(Integer.toString(conversorToInt(PlotView.min_sim)), EditText.BufferType.EDITABLE); et3.setText(Integer.toString(MusicService

Your implementation of PreferenceActivity is vulnerable to fragment injection

江枫思渺然 提交于 2019-12-11 04:58:52
问题 Here is my java class. public class MyPrefrences extends PreferenceActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); } } in my project i used preferences.xml <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:title="@string/steps_settings_title"> <ListPreference android:key="sensitivity" android:title="@string/setting" android:summary="

FATAL EXCEPTION main Android App

耗尽温柔 提交于 2019-12-11 03:52:05
问题 I am currently working on an Android app. When I click Menu, the Menu shows up, but then if you choose "Preferences" it crashes. If you click "New" it works fine. I don't know what is going on. I am new to Android App development and the eclipse IDE, so anything helps. Here is the LogCat: 11-14 12:14:44.665: E/AndroidRuntime(392): FATAL EXCEPTION: main 11-14 12:14:44.665: E/AndroidRuntime(392): java.util.UnknownFormatConversionException: Conversion: r 11-14 12:14:44.665: E/AndroidRuntime(392)

How to open AlertDialog from preference screen?

大憨熊 提交于 2019-12-11 02:52:20
问题 My activity is below import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.os.Bundle; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.PreferenceActivity; import android.preference.PreferenceScreen; public class locationserviceSettings

Preferences doesn't work

我怕爱的太早我们不能终老 提交于 2019-12-11 02:39:36
问题 I have a problem with preference in my app. I created preference.xml: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <!-- General screen --> <PreferenceCategory android:title="@string/general_category" android:key="prefGeneralCategory"> <CheckBoxPreference android:icon="@drawable/content_discard" android:title="@string/pref_general_vibration" android:defaultValue="false" android:key="prefVibration" android:summaryOn=

Individual Preferences for each item in a ListView?

自作多情 提交于 2019-12-11 02:34:23
问题 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 item results in changes to all others as well). To give a more detailed example: Say i have a list of cars: * Car 1 * Car 2 * Etc... I would like to be able to click on "Car 1

How do I get rid of the Eclipse Find/Replace Bar

吃可爱长大的小学妹 提交于 2019-12-11 01:03:43
问题 For searching a document, I like using the floating Find/Replace window that pops up. Lately, however, hitting command - F pulls up this Find/Replace bar at the bottom of the editor window. I suppose I wouldn't mind it so much, except instead of selecting the text to search it puts the insertion point after whatever I've searched for before. Very annoying. Clicking on the magnifying glass pops up the other Find/Replace dialog. How can I get the normal dialog to pop-up by default? I should add

Standard Way of Storing User Preferences on Client via Web Application

梦想与她 提交于 2019-12-10 18:11:34
问题 I realize this might not be a best fit for SO, so please tell me where I should move/post this if that is the case. My idea is after a user signs into the system, store the user preferences on the client in the form of cookies. If a user modifies said preferences, update the cookies. I need to do this because some of the preferences are client related and will need to be looked at via JavaScript. I realize I'll need the preferences stored on the server as well. Just wanting to know if pulling

Aptana Studio 3, build: 3.5.0.201312191422 theme - the currently displayed page contains invalid values

核能气质少年 提交于 2019-12-10 15:17:04
问题 What shall I do? I just updated Aptana and now the Theme part of the Preferences is not working anymore. Anybody with idea or suggestion? 回答1: I got the same problem. After updating Aptana to 3.5, whenever I looked at the themes settings, it crashed down saying. "the currently displayed page contains invalid values" Probably the new update has its own bugs for some reason. the only way to fix the problem is to downgrade the version of Aptana studio. https://wiki.appcelerator.org/display/tis

Converting NSUserDefaults to Keychain?

蓝咒 提交于 2019-12-10 14:50:15
问题 So, NSUserDefaults is quite easy to use. But apparently, it is not too secure - there is no encryption. And of course the client wants the app prefs to be secure because it contains sensitive data. But the Keychain is secure, though hard to code (apparently). So is there a way to easily convert NSUserDefaults code to Keychain code? In other words, I want to store app prefs within the Keychain. Or am I barking up the wrong tree? 回答1: Both of the below solutions are wrappers around KeyChain API