Stay organized with collections
Save and categorize content based on your preferences.
RadioGroup.OnCheckedChangeListener
public
static
interface
RadioGroup.OnCheckedChangeListener
android.widget.RadioGroup.OnCheckedChangeListener
|
Interface definition for a callback to be invoked when the checked
radio button changed in this group.
Summary
Public methods
public abstract void onCheckedChanged (RadioGroup group,
int checkedId)
Called when the checked radio button has changed. When the
selection is cleared, checkedId is -1.
Parameters |
group |
RadioGroup : the group in which the checked radio button has changed
This value cannot be null . |
checkedId |
int : the unique identifier of the newly checked radio button |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# RadioGroup.OnCheckedChangeListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nRadioGroup.OnCheckedChangeListener\n==================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/RadioGroup.OnCheckedChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nRadioGroup.OnCheckedChangeListener\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------|\n| android.widget.RadioGroup.OnCheckedChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\nInterface definition for a callback to be invoked when the checked\nradio button changed in this group.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onCheckedChanged](/reference/android/widget/RadioGroup.OnCheckedChangeListener#onCheckedChanged(android.widget.RadioGroup,%20int))`(`[RadioGroup](/reference/android/widget/RadioGroup)` group, int checkedId) ` \u003cbr /\u003e Called when the checked radio button has changed. |\n\nPublic methods\n--------------\n\n### onCheckedChanged\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onCheckedChanged (RadioGroup group, \n int checkedId)\n```\n\n\u003cbr /\u003e\n\nCalled when the checked radio button has changed. When the\nselection is cleared, checkedId is -1.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------|\n| `group` | `RadioGroup`: the group in which the checked radio button has changed This value cannot be `null`. \u003cbr /\u003e |\n| `checkedId` | `int`: the unique identifier of the newly checked radio button \u003cbr /\u003e |"]]