We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I set listener for state change? setOnCheckedChangeListener seems not working.
The text was updated successfully, but these errors were encountered:
same here
Sorry, something went wrong.
Hi @Duna and @Morteza-Rastgoo.
This is a late answer but I used with RadioGroup.OnCheckedChangeListener.
` public class MediaActivity extends BaseActivity implements, RadioGroup.OnCheckedChangeListener{
private static final String STATE_PLACE = "state_place"; @BindView(R.id.imageTypeSegmentedGroup) SegmentedGroup imageTypeSegmentedGroup; private Boolean placeChecked; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_media); ButterKnife.bind(this); if (savedInstanceState != null) placeChecked = savedInstanceState.getBoolean(STATE_PLACE, false); imageTypeSegmentedGroup.setOnCheckedChangeListener(this); } @Override protected void onSaveInstanceState(Bundle outState) { outState.putBoolean(STATE_PLACE, placeChecked); super.onSaveInstanceState(outState); } @Override public void onCheckedChanged(RadioGroup group, int checkedId) { switch (checkedId) { case R.id.placeRadioButton: placeChecked = false; break; case R.id.foodRadioButton: placeChecked = true; break; } }
} `
No branches or pull requests
How do I set listener for state change?
setOnCheckedChangeListener seems not working.
The text was updated successfully, but these errors were encountered: