Questions tagged [checkboxpreference]

CheckboxPreferences are boolean values stored in SharedPreferences

Click here To know more about this class.

95 questions
0
votes
0 answers

Error at android.preference.Injector$CheckBoxPreferenceHook.after_onBindView with custom CheckBoxPreference

I have a custom CheckBoxPreference with below code and it's not working on some devices. How do I fix it? I have searched for some info but I cannot find the same bug. Here is the MCheckPreference class code: public class MCheckPreference extends…
0
votes
1 answer

How to save data about multiple checkboxes using shared-preferences?

I am making an app for which I need to store the data of 60 check boxes. The data is read when the user presses the submit button. I want to display the user selection when the app is restarted. I am trying to do it using the shared-preferences but…
0
votes
1 answer

The value of the CheckBoxPreferences makes an effect only after the Activity is restarted

I've got a question about CheckBoxPreferences. I've read through the number of related threads and tried some of them but as I am a beginner I am still struggling to find the solution for the issue I am facing up. Below code is to apply a polygon…
Budjoni
  • 15
  • 1
  • 1
  • 4
0
votes
1 answer

Android : Read ChekboxPreference value from Service

I have an Android Service which implements SensorEventListener for detecting motion. I've a CheckBoxPreference where user can choose to enable or disable motion detection. The problem I'm facing is that I'm not able to get the correct value in the…
PsyGik
  • 3,535
  • 1
  • 27
  • 44
0
votes
0 answers

Where can I find the underlying xml for a CheckBoxPreference?

I would like to have a look at the various xml views (and specifically the CheckBoxPreference) that are inflated in the list view that makes up the PreferenceActivity. Where are the source code for these located? I mean Android's source code for how…
Suragch
  • 935
  • 3
  • 9
  • 15
0
votes
2 answers

Android:How to get all available Calendars from mobile

Unfortunately I have unable to found any help regarding this. Actually I want to fetch all available calendars(may be calendar preference) list from mobile for example Google calendar, yahoo calendar. For better explanation I captured some images…
Ranjit
  • 5,130
  • 3
  • 30
  • 66
0
votes
1 answer

android - Clearing cache of CheckBoxPreference

I am developing a PreferenceActivity where I can add CheckBoxPreference instances according to some dynamic content. I also maintain a count of the checked preferences in the activity. Everything is good when I load the application for the first…
Ketan
  • 738
  • 2
  • 9
  • 20
0
votes
1 answer

Why i can't stop the service?

I can't stop my service through checkboxpreferences.This is the CheckBoxPreference code CheckBoxPreference checkBoxPref = (CheckBoxPreference) getPreferenceManager().findPreference("firstDependent"); …
0
votes
0 answers

Align CheckBoxPreference To Right Android

I want To align the title of check box to right and the box to left because i want to used in Arabic app , How I can Do that ?
0
votes
1 answer

dynamic preference checkbox puzzle

I'm confused about what's happening in the following code. It's actually doing what I want but I thought I'd have to do more work. In the onCreate method the checkboxes are retaining their checked or unchecked state from a previous run even after…
0
votes
2 answers

Can we show a button instead of icon with a CheckboxPreference

I am working with checkBoxPreference from few days, have figured out: how to display icon with checkBoxPreference, how to change colour of title and summary Now, I need to add a button instead of the icon. So any one here has any ideas on…
AliR
  • 2,065
  • 1
  • 27
  • 37
0
votes
1 answer

Android: Hiding and Showing CheckBoxPreference

I have a PreferenceScreen with multiple PreferenceCategory that have many CheckBoxPreferences in them. I'm trying to create an expandable list concept by hiding or displaying a category on click of the preference category label. I can implement the…
0
votes
1 answer

Android: Change CheckBoxPreference icon for checked/unchecked programmaticaly

I have some CheckBoxPreferences and I have no problem changing the icon for them through xml as shown below and here but since the user has other ways of triggering the checkbox's actions than directly clicking on it (i.e. perhaps in another…
0
votes
1 answer

Add or remove dynamically CheckBoxPreferences (Android)

I have a list of cities, and i want a user can choose one of these cities to add it in preferences. To do it, he goes on the CityActivity (which represents one city), open an OptionMenu and choose "Add to favorite". All the cities have a name, an ID…
QLag
  • 823
  • 1
  • 13
  • 33
0
votes
1 answer

Best way to update checkbox prefefences

I was coding a clock for android. For it, i set a function which updates screen 1 time each a second, so my program can consume a lot of resources, and my objective is to add a checkbox preference, consuming the less resources as I can. Then, my…
BamsBamx
  • 4,139
  • 4
  • 38
  • 63