passing string from RadioButton android:text="@string/blue" to the next activity in android
<p>i have</p>

<pre><code>&lt;RadioGroup
    android:id="@+id/sign_up_select_colour"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"

    &lt;RadioButton
        android:id="@+id/rdbtn_red"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/red" /&gt;

    &lt;RadioButton
        android:id="@+id/rdbtn_blue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/blue" /&gt;
&lt;/RadioGroup&gt;
</code></pre>

<p>i want to send the string <em>blue</em> to the next activity the same way i did with EditText here (with your help earlier);</p>

<pre><code>EditText editTextSignUpUserName = (EditText) findViewById(R.id.sign_up_user_name);
String signUpUserName = editTextSignUpUserName.getText().toString();
intent.putExtra("username", signUpUserName);
</code></pre>

<p>i've tried this;</p>

<pre><code>RadioButton selectedRadioButton = (RadioButton)   findViewById(R.id.sign_up_select_colour);
String signUpColour = selectedRadioButton.getCheckedRadioButtonText().toString();
intent.putExtra("colour", signUpColour);
</code></pre>

<p>please and thanks.</p>
