title: getCheckedRadioButtonId() returning useless int?
body: <p>I have a button's onClickListener that needs to detect which radiobutton was selected when the user clicks the button. Currently, the Log.v you see below in the onClickListener is not returning a useless bit of info:</p>
  
  <p>This is clicking submit three times with a different radio selected each time:</p>
  
  <blockquote>
    <p>04-27 19:24:42.417: V/submit(1564): 1094168584</p>
    
    <p>04-27 19:24:45.048: V/submit(1564): 1094167752</p>
    
    <p>04-27 19:24:47.348: V/submit(1564): 1094211304</p>
  </blockquote>
  
  <p>So, I need to know which radioButton is actually selected - is there a way to get the object of the radiobutton? I want to be able to get it's id# from XML, as well as its current text.</p>
  
  <p>Here's the relevant code:</p>
  
  <pre><code>public void buildQuestions(JSONObject question) throws JSONException {
  
      radioGroup = (RadioGroup) questionBox.findViewById(R.id.responseRadioGroup);
  
      Button chartsButton = (Button) questionBox.findViewById(R.id.chartsButton);
      chartsButton.setTag(question);
      Button submitButton = (Button) questionBox.findViewById(R.id.submitButton);
  
      chartsButton.setOnClickListener(chartsListener);
      submitButton.setOnClickListener(submitListener);
  
      TagObj tagObj = new TagObj(question, radioGroup);
      submitButton.setTag(tagObj);
  
  }
  
  public OnClickListener submitListener = new OnClickListener() {
      public void onClick(View v) {
          userFunctions = new UserFunctions();
          if (userFunctions.isUserLoggedIn(activity)) {
              TagObj tagObject = (TagObj) v.getTag();
              RadioGroup radioGroup = tagObject.getRadioGroup();
              JSONObject question = tagObject.getQuestion();
  
              Log.v("submit", Integer.toString(radioGroup.getCheckedRadioButtonId()));
              SubmitTask submitTask = new SubmitTask((Polling) activity, question);
              submitTask.execute();
  
          }
      }   
  };
  </code></pre>