Questions tagged [switchpreference]

51 questions
0
votes
1 answer

How is the SwitchPreference intended to be used? (ClassCastException)

I tried to use 2 SwitchPreference in a PreferenceActivity. At the first start of the PreferenceActivity, everything works normal; the activity gets started without problem, the settings.xml is displayed The problems start if one attends to close the…
SilverMonkey
  • 1,003
  • 7
  • 16
0
votes
0 answers

Password protected SwitchPreference

In my settings Fragment I have a password protected SwitchPreference. I use it to unlock an "Edit mode" in the app. Not everyone should be allowed into this mode so I've put a password on it. However, this causes a problem. Initially clicking the…
eoinzy
  • 2,152
  • 4
  • 36
  • 67
0
votes
1 answer

cannot Handle SwitchPreference checked state through AlertDialog

Hello i am building a preference activity in which i have a SwitchPreference through i enable some EditTexts. When the switch is checked an AlertDialog for the user to pick a master password. I want if the user does not select a password the switch…
0
votes
1 answer

Android 5.x SwitchPreference is not behaving the same as in Android 4.x

I have a code using SwitchPreference that used to work with Android 4.x however it no longer works since I updated my device to Android 5.0.1. I have a simple SwitchPreference which displays a title on the left and an ON/OFF switch on the right. …
0
votes
1 answer

Android settings change when scrolling

I have a pretty standard PreferenceFragment, it is implemented using a FragmentActivity. Nothing really special but I have some (small number) of people using that app reporting that as they scroll the settings some randomly turn themselves off or…
-1
votes
1 answer

Android SwitchPreference

How to make the SwitchPreferences look rectangular with yes and no texts. I am short on time and so cannot create a custom lay out. The one I am getting now is like this:- 'O-' '-O'.
1 2 3
4