Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old February 6th, 2012, 01:50 PM   #1 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 3
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Post Android/Eclipse, connecting radio button selections to Checkbox selections

I am coding an android application and i have 2 radio buttons (in a radiogroup) that i want to control the behavior selection for checkboxes...so when i select radio button 1 (which equals 9 choices) should allow the user to only check 9 Checkboxes (even if there are twenty checkboxes. This is my code so far, am stuck
Code:
public class Main extends Activity{ Button button; /** Called when the activity is first created. */  @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.main);     addListenerOnButton();      final RadioButton radio0 = (RadioButton) findViewById(R.id.radio0);     final RadioButton radio1 = (RadioButton) findViewById(R.id.radio1);     radio0.setOnClickListener(radio_listener);     radio1.setOnClickListener(radio_listener);  }  public OnClickListener radio_listener = new OnClickListener() {     public void onClick(View v) {         // Perform action on clicks         RadioButton rb = (RadioButton) v;         // allow user only to select 9 or 18 check box choices          }     });  }   }

notageekgirl is offline  
Reply With Quote
Sponsors
Reply

Bookmarks

Tags
checkbox activity intent, listview arrayadapter checkbox, radio button


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 12:14 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo