/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    final Button button = (Button) findViewById(R.id.button);
    final EditText edittext = (EditText) findViewById(R.id.edittext);
    final CheckBox checkbox = (CheckBox) findViewById(R.id.checkbox);
    final RadioButton radio_red = (RadioButton) findViewById(R.id.radio_red);
    final RadioButton radio_blue = (RadioButton) findViewById(R.id.radio_blue);
    final ToggleButton togglebutton = (ToggleButton) findViewById(R.id.togglebutton);
    final RatingBar ratingbar = (RatingBar) findViewById(R.id.ratingbar);

    button.setOnClickListener(button_listener);
    edittext.setOnKeyListener(edittext_listener);
    checkbox.setOnClickListener(checkbox_listener);
    radio_red.setOnClickListener(radio_listener);
    radio_blue.setOnClickListener(radio_listener);
    togglebutton.setOnClickListener(togglebutton_listener);
    ratingbar.setOnRatingBarChangeListener(ratingbar_listener);
  }
 public void onClick(View v) {
   // Perform actions on clicks
   RadioButton rb = (RadioButton) v;
   Toast.makeText(HelloFormStuffActivity.this, rb.getText(), Toast.LENGTH_SHORT).show();
 }