title: Android Radio Buttons Not Displaying
body: <p>I'm learning Android development and I'm trying to learn how to use radio buttons. When I run the below code I see the string "Attending?" but I don't see any radio buttons or their labels. What am I missing?</p>
  
  <h1>MainActivity.java</h1>
  
  <pre><code>package com.example.andriod.assignment1;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.RadioButton;
  import android.widget.Toast;
  
  public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  
      public void onRadioButtonClicked(View view) {
          // Is the button now checked?
          boolean checked = ((RadioButton) view).isChecked();
          // Check which radio button was clicked
          switch(view.getId()) {
              case R.id.yes_radio:
                  if (checked) {
                      //your code here
                      Toast.makeText(getApplicationContext(), "Thanks for coming!", Toast.LENGTH_LONG).show();
                      break;
                  }
              case R.id.no_radio:
                  if (checked) {
                      //your code here
                      Toast.makeText(getApplicationContext(), "See you next time!", Toast.LENGTH_LONG).show();
                      break;
                  }
          }
      }
  }
  </code></pre>
  
  <h1>activity_main.xml</h1>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"&gt;
  
      &lt;TextView android:text="Attending?" android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;RadioGroup
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
          &lt;RadioButton
              android:id="@+id/yes_radio"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:onClick="onRadioButtonClicked"
              android:text="@string/yes" /&gt;
          &lt;RadioButton
              android:id="@+id/no_radio"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="onRadioButtonClicked"
              android:text="@string/no" /&gt;
      &lt;/RadioGroup&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>