title: Android: Changing the contents of a Text View using a radio button
body: <p>So, I am trying to write code that will show that Radio Button clicks register. Ideally, when a radio button is chosen, the contents of a TextView will change. To start, I have a radio button for 'North'. When North is checked, the contents of the TextView will become 'North'. I know there are action listeners involved, but I am not familiar with Java. This will surely pop my Java cherry. That being said, the code I have written is not working. Can anyone tell me if I am on the right track, or offer some suggestions? Note, this is not for a class assignment. This is for a very open ended class project that I am working on with another person.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  }
  public void onRadioButtonClicked(View v){
    TextView text = (TextView)findViewById(R.id.text);
  
      RadioButton N = (RadioButton)  findViewById(R.id.north);
  
      //evaluates 'checked' value of radio button
      boolean  checked = ((RadioButton) v).isChecked();
  
   if(N.isChecked () ){
  
       text.setText("N");
   }
  }
  </code></pre>
  
  <p>}</p>