Code example for RadioGroup

Methods: addViewgetChildCount

0
	 
	private void addPollOption(String pollOptionText){
		RadioButton radioButton = new RadioButton(this);
		radioButton.setText(pollOptionText);
		radioButton.setOnClickListener(createRadioPollOption());
		pollOptions.addView(radioButton);
 
		numberOfWords = 0;
		newPollOptionEditText.setText("");
		addPollOptionButton.setEnabled(numberOfWords > 0 && pollOptions.getChildCount()<MAX_NUM_POLL_OPTIONS);
	} 
 
 
	 
	private void startPoll() { 
		(new CreatePollService(getPollDescriptionText(), getPollOptionsAsArray(), this)).execute();
	} 
 
	private String getPollDescriptionText() {
		return pollDescription.getText().toString();
	}