Questions tagged [oncheckedchanged]

Method to provide a callback when the checked state of a compound button changed in Android.

The onCheckedChanged is a static interface definition for a callback to be invoked when the checked state of a compound button (Checkbox, RadioGroup, etc.) changed:

onCheckedChanged(CompoundButton buttonView, boolean isChecked)  

which has these parameters:

  • buttonView: The compound button view whose state has changed.
  • isChecked: The new checked state of buttonView.

The Reference: CompoundButton.OnCheckedChangeListener
A sample from the Documentation: RenderScriptIntrinsic (MainActivity class)
Tags related: ,

131 questions
0
votes
1 answer

CompineLatest that observe multipe checked buttons Rxjava

I have created custom button, it has inner checked listener and I expose it as an observable with the help of a PublishSubject. public class SwitchItem extends LinearLayout implements SwitchButton.OnCheckedChangeListener { //other fields ... …
Mohamed Ibrahim
  • 3,714
  • 2
  • 22
  • 44
0
votes
1 answer

onCheckedChanged Systematically Called Upon Initialising Method

I have a bindView Method which implements setOnCheckedChangeListener. However, upon initializing this Method, the onCheckedChanged Method is systematically called. How could I avoid this? Here is my code: public void bindView(View view, Context…
JF0001
  • 819
  • 7
  • 30
0
votes
1 answer

OnCheckedChanged not being fired on re-population of the form

I have a Gridview that has two buttons Edit & Delete. On Edit, the row command calls a function called "Populate()" that populates a form located above the grid in a Panel (sets visible = true ). Problem: I have a checkbox "cbX", a textbox "txtX",…
HelpWanted
  • 71
  • 1
  • 9
0
votes
1 answer

How to set OnCheckedChangeListener to a checkbox of a cell in a listview

Hi guys I am trying to set an OnCheckedChangeListener on a CheckBox declared in the xml file that represent the single row of the ListView (item_todo.xml), here the code of the checkbox:
0
votes
0 answers

OnCheckedChangeListener not working

I am trying to set an event listener for Radio group, but when debbugging never triggers the listener, why? this how I have set up the radio group in order to look the way as is shown in the picture attached and perhaps there may be a problem with…
Jhonycage
  • 759
  • 3
  • 16
  • 36
0
votes
2 answers

onCheckChanged is only called the first time

I want to get a value from checking a RadioButton. I have three RadioButton (with different values) inside a RadioGroup. Well, the first time I check a RadioButton I am able to get the value, but if I change to another RadioButton I cannot get…
0
votes
0 answers

Custom Radio-Group, add "setOnCheckedChangeListener"

Okay, first of all I have a custom radiogroup because i want different radiogroup layout e.g. 3x3 radiogroup. The class looks like this: public class CustomRadioButtons extends TableLayout implements OnClickListener{ private static final String TAG…
Erik
  • 21
  • 4
0
votes
1 answer

OnCheckedChange Event does not execute my event

I've been reading a few posts in here and some are related to my problem, but for some reason the solutions provided dont work for me. Basically I have two GridView controls with checkboxes. They have the exact same code, but just fire different…
0
votes
0 answers

get Switch-Button State in Fragment from Activity with Eventbus

I´ve got the following scenario: I have a MainActivity which hosts 3 Fragments (Tabs). In my Fragment I´ve got two Switch-Toggles, whose state I would like to publish to the hosting Activity (MainActivity) with EventBus. I´ve set up two…
0
votes
2 answers

Simple checkbox logic

The problem that was given to me in our class is that you have the option to check 4 Checkboxes that are labeled (A, B, C, D). Each checkbox has a value of 10. If you check one, the number that will be shown in the EditText will be 10, if you check…
0
votes
0 answers

How to On the switch if the ringing volume is at max and Off the switch if the ringing volume is less than max?

//set the Volume switch to ON swVolume.setChecked(true); //attach a listener to check for the changes in state swVolume.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void…
0
votes
1 answer

OnCheckedChangedListener for checkboxes that loaded in listview inside a fragment

I am trying to declare a change listener for all checkboxes that are loaded in a listview, where the listview is also loaded by a fragment, here is my code: the fragment: public class AddGroupMembersFragment extends Fragment{ …
Mohammad
  • 3,449
  • 6
  • 48
  • 75
0
votes
2 answers

Determining row of grid from templated checkbox selection with autopostback

I have a databound grid with a templated field column that is a checkbox. When the user checks the checkbox, it will autopostback and update the row to indicate the box's check state. My first attempt was to simply use the OnCheckedChanged method,…
Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
0
votes
0 answers

automatically execute OnCheckedChangedListener when a check box is setChecked(true) in code

Suppose I have a bunch of checkboxes in a listview. I'm fetching some data from DB to set checked to those checkboxes. Each checkbox have some specific chekedListeners. If a checkbox is checked if found to be needed checked from DB, will the…
srv242
  • 105
  • 10
0
votes
2 answers

object is not getting removed from list onCheckedChange listener of check box

I have a list of contacts. I have a check box to select the contacts. These selected contacts I want to add in another list called invitation array list. I have created a method to add all contacts in invitation list if check box is selected called…
Sid
  • 2,792
  • 9
  • 55
  • 111
1 2 3
8 9