Guest User

Untitled

a guest
Jul 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. final RadioButton[] buttons = {radio_books,radio_games,radio_dvds,radio_electronics};
  2. for (RadioButton this_button : buttons) {
  3. this_button.setOnClickListener(new OnClickListener() {
  4. @Override
  5. public void onClick(View v) {
  6. for (RadioButton button : buttons) {
  7. if ((RadioButton)v != button) {
  8. button.setChecked(false);
  9. }
  10. }
  11. }
  12. });
  13. }
Add Comment
Please, Sign In to add comment