title: RadioGroup empty field check using setError in Android
body: <p>I was wondering how to <code>setError</code> for a <code>RadioGroup</code>[gender] with <code>RadioButton</code>'s [gender_b,gender_c] if it is null.</p>
  
  <p>This is how i'm getting the <code>RadioButton</code> values though:</p>
  
  <pre><code>private boolean genradiocheck() {
  
  
      boolean gender_flag = false;
      if (gender.getCheckedRadioButtonId() == -1) {
  
  
  
      } else {
          gender_b = (RadioButton) findViewById(gender
                  .getCheckedRadioButtonId());
          System.out.println("*********************" + gender_b.getText());
          gender_flag = true;
      }
  
      return gender_flag;
  }    
  </code></pre>
  
  <p>Now my question is, how do i put it into a string and check for null values? </p>
  
  <p>This is for a Registration form validation. Thank you.</p>