共用方式為


CompoundButton.SetOnCheckedChangeListener Method

Definition

Register a callback to be invoked when the checked state of this button changes.

[Android.Runtime.Register("setOnCheckedChangeListener", "(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V", "GetSetOnCheckedChangeListener_Landroid_widget_CompoundButton_OnCheckedChangeListener_Handler")]
public virtual void SetOnCheckedChangeListener (Android.Widget.CompoundButton.IOnCheckedChangeListener? listener);
[<Android.Runtime.Register("setOnCheckedChangeListener", "(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V", "GetSetOnCheckedChangeListener_Landroid_widget_CompoundButton_OnCheckedChangeListener_Handler")>]
abstract member SetOnCheckedChangeListener : Android.Widget.CompoundButton.IOnCheckedChangeListener -> unit
override this.SetOnCheckedChangeListener : Android.Widget.CompoundButton.IOnCheckedChangeListener -> unit

Parameters

listener
CompoundButton.IOnCheckedChangeListener

the callback to call on checked state change

Attributes

Remarks

Java documentation for android.widget.CompoundButton.setOnCheckedChangeListener(android.widget.OnCheckedChangeListener).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to