Questions tagged [checkboxpreference]

CheckboxPreferences are boolean values stored in SharedPreferences

Click here To know more about this class.

95 questions
99
votes
17 answers

Android: How to remove margin/padding in Preference Screen

I am facing very weird problem in designing preference screen. Though I am not giving any margin in layout,it is leaving some space in left. As you can see in image below: XML:
Dory
  • 7,462
  • 7
  • 33
  • 55
20
votes
3 answers

Android CheckBoxPreference Default Value

I have the following XML code for my CheckBoxPreference: But when I retrieve the preference in code the value is…
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191
12
votes
1 answer

CheckBoxPreference with own layout

I have PreferenceScreen with some PreferenceCheckBoxes. I want to change the textColor and textSize for title and summary and the images for the CheckBox checked and uncheckes. So I am using android:layout to change this attributes. My…
woyaru
  • 5,544
  • 13
  • 54
  • 92
12
votes
4 answers

Dynamically create CheckBoxPreferences

I am currently building out a list of rows with checkboxes dynamically using content from a web service. However, this ListView will need to do pretty much what a PreferenceActivity would accomplish. I don't know the number of rows as the content…
askilondz
  • 3,264
  • 2
  • 28
  • 40
6
votes
2 answers

Android CheckBoxPreference - un/check all preferences

I have a PreferenceScreen containing only CheckBoxPreferences (categories to select). I need an option to check/uncheck all of them. I have the following code that does the job but there is one problem: checkboxes on the screen are not updated - I'd…
shadyyx
  • 15,825
  • 6
  • 60
  • 95
6
votes
2 answers

Set Value of a CheckBoxPreference in an Activity

Hello I need to know how to set a value programmatically. I am using that code SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); . . …
Mano
  • 517
  • 1
  • 8
  • 21
5
votes
2 answers

multiple dependency in checkboxpreference android or listpreference's dependency

For example: i have three checkboxes in my preference screen and there is 3 different listpreference(A,B,C) depended on each checkbox. i want to make the user select only one checkbox at a time. How do i achieve this? There is no radio button in…
sxanus
  • 73
  • 1
  • 6
5
votes
0 answers

Android how to get the preferenceScreen of a checkBoxPreference

I have a preference xml file that at some point of it it looks like this:
5
votes
4 answers

Increasing CheckboxPreference title and summary text size and glowing of an preference entry

Hi I am working on Message Settings as a preference. I am trying to change android:title and android:summary text font size of CheckboxPreference. For this I am trying out the below code
5
votes
4 answers

Disabling checkbox checking in WPF

I want to make impossible checking checkbox in WPF (from C# code). Only unchecking would be allowed. How can I do it? PS.Writing event handler on Click event which would immediately uncheck checkbox after checking it is not…
patryk.beza
  • 4,876
  • 5
  • 37
  • 56
4
votes
1 answer

CheckBoxPreference .isChecked() returns contrary value

I'm trying to build my PreferenceActivity using fragments. I have a PreferenceFragment containing two CheckBoxPreferences:
Kurztipp
  • 391
  • 2
  • 18
3
votes
4 answers

multiple dependency in checkboxpreference android

i have three checkboxes in my preference screen. i want to make the user select only one checkbox at a time. How do i achieve this? thank you in advance.
user590849
  • 11,655
  • 27
  • 84
  • 125
3
votes
2 answers

PreferenceActivity as Main Activity

I'm a noob working on my first app that consists of the following: Main Activity which simply has one CheckBox which upon an onClick starts/stops my service. Service which runs a method (quick database query) every 60 seconds. After getting…
capitalf
  • 471
  • 1
  • 6
  • 14
3
votes
1 answer

Android: Show/hide preference on checking/unchecking other CheckBoxPreference

Im trying to accomplish such a thing: when I check CheckBoxPreference 'A' the other preference ('B') shows below the A, when I uncheck 'A', preference 'B' hides... So generally speaking it should work just like dependency but not only…
Bartek Lipinski
  • 30,698
  • 10
  • 94
  • 132
3
votes
1 answer

Saving preferences causes stackoverflow error

I have the following code: sP = PreferenceManager.getDefaultSharedPreferences(this); OnSharedPreferenceChangeListener listener = new SharedPreferences.OnSharedPreferenceChangeListener() { @Override public void…
1
2 3 4 5 6 7