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
1
vote
3 answers

C# ASP.NET CheckBox_OnCheckedChanged not firing as expected

I have an issue with both Checkbox_OnCheckedChanged and Dropdownlist_OnSelectedIndexChanged events not triggering the relevant functions in my code behind. Both Controls are bound to values in a GridView. On the first OnCheckedChanged or…
neilrudds
  • 205
  • 1
  • 6
  • 19
1
vote
1 answer

OnCheckedChangeListener not invoked immediately

I have a switch within a menu that is show as an action on the action bar. The onCheckedChangeListener is not being invoked immediately after when I set the checked property to true. The switch does show up in the action bar, and every time it is…
1
vote
2 answers

How to use Unity Toggle Check Function (checked and unchecked)

I'm trying to toggle. When I click on the toggle (if it is on I mean checked), it closes some gameobject, if I click on the toggle (if it is off I mean unchecked) it opens some gameobject but I don't know which function…
Nurullah
  • 103
  • 3
  • 4
  • 14
1
vote
0 answers

If I cannot use C# to respond in realtime to radio button CheckedChanged events in Sharepoint, how can I add client-side (jQuery) code to do it?

I posed a similar question about this before, and it would seem based on the answers that I received that I can't expect to be able to rely on a radio button's CheckedChanged event to fire in real time. Am I really stuck with waiting until the form…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
1
vote
0 answers

How to select a single checkbox while disabling clickable option in other checkbox if i have two checkboxes in android?

I have two checkboxes with yes or no options.I have to select only one option while disabling the clickable option of other checkbox. opp11 and op12 are two checkboxes.The following code seems to work but what if i have around 20 checkbox options.Is…
Hari Sankar
  • 197
  • 2
  • 15
1
vote
3 answers

How to distinguish user vs programmatic changes in WinForms CheckBox?

I have logic on a CheckBox's OnCheckedChanged event that fires on form load as well as when user changes check state. I want the logic to only execute upon user action. Is there a slick way of detecting user vs programmatic change that doesn't rely…
cs31415
  • 169
  • 3
  • 12
1
vote
3 answers

Android radio group onCheckChangedListener crashing app

Any idea why this would crash my app when I select a radio button? I've imported android.widget.RadioGroup.OnCheckedChangeListener, and I've also tried new RadioGroup.OnCheckedChangeListener() which was the solution to a similar post. The code is…
abalter
  • 9,663
  • 17
  • 90
  • 145
1
vote
1 answer

Why onCheckedChanged() for RadioButton doesn't get raised in android?

I have a Fragment. There are two radio buttons in it. I am trying to create a TextView in this fragment and change its content according to the RadioButton user checks. Below you can see my code. My problem is that when I click on radio buttons…
Fatima
  • 869
  • 10
  • 35
1
vote
1 answer

Why am I unable to assign views within an array to a listener?

Here is my code for my class; I realize it is a large chunk of code but I feel it is relevant for my problem. I have a set of switches and arrays of which those switches are put into. My problem is; when I try to assign those arrays to an…
Timothy Frisch
  • 2,995
  • 2
  • 30
  • 64
1
vote
2 answers

VB - how to link up a Check_change to code behind for a checkbox

How do I enable a check_change for a checkbox in VB. Here is what I have so far. Code Behind: Protected Sub CheckBoxCash_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxCash.CheckedChanged Label1.Text…
Bill Quinn
  • 11
  • 2
1
vote
1 answer

How to get the object name of a changed checkbox-item?

I want to get the .(name)-Proterty of a checkbox, which has been changed? I need just a little example shown on a Messagebox. Little Snippet: namespace Checkboxes { public partial class Form1 : Form { public Form1() { …
MrMAG
  • 1,194
  • 1
  • 11
  • 34
1
vote
2 answers

Radiogroup with Togglebuttons not working properly

I tried to implement a radiogroup with four togglebuttons. The desired behaviour is the typical radio group behaviour: One button is preselected, if the user clicks another button, the previous one is unselected and the new one selected instead. If…
friday
  • 1,358
  • 1
  • 14
  • 23
1
vote
1 answer

ASP.NET: Why does my CheckedChanged event not execute when I "uncheck" the control?

I have a checkbox that is part of a repeater. I'm trying to get the checkbox's checkedchanged event to occur when I check the box and when I uncheck the box. The event currently only triggers when I check the box however... not when i uncheck…
daveomcd
  • 6,367
  • 14
  • 83
  • 137
1
vote
2 answers

OnCheckedChangeListener & OnClickListener in android -- Button half-works on first click, finishes on second click?

Well... here's a problem it looks like I'm not the first to experience looking through other questions, however I can't find one that's Android-specific (others are C++ or straight java with different scenarios). I have a calculator that determines…
1
vote
2 answers

Android Checkbox asking confirmation twice when unchecking

I have a CheckBox in my code and if it's checked, the user shouldn't be able to just uncheck it. This is why I decided to implement an onCheckedChangeListener on the Checkbox. If it's checked and clicked then confirmation is asked, else no…
Mats Raemen
  • 1,781
  • 1
  • 28
  • 41
1 2 3
8 9