mRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
private boolean isChecked(RadioGroup group, int viewId) {
if (viewId != -1) {
View v = group.findViewById(viewId);
if (v instanceof RadioButton) {
return ((RadioButton) v).isChecked();
}
}
return true;
}
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (!isChecked(group, checkedId)) {
return;
}
// put your code here
}
});
Hello everyone, The purpose of this blog is to give you all kind of technical support in simple manner. Find latest technology support every time so as to keep you updated on daily basis. Exact source code snippet will help you understand more and integrate same in difficult situation. Note: Blog is maintained by Nikhil Lotke.
Tuesday, January 31, 2017
Issue Handling - RadioGroup setOnCheckedChangeListener getting call multiple times during initialization in Android
Labels:
android
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment