fork download
  1. package com.SG.Three_Piece_Radio;
  2.  
  3. import android.os.Bundle;
  4. import android.app.Activity;
  5. import android.content.Context;
  6. import android.content.Intent;
  7. import android.view.Menu;
  8. import android.view.View;
  9. import android.widget.RadioButton;
  10.  
  11. class MyIntent extends Intent
  12. {
  13. MyIntent(Context packageContext,Class<?> cls )
  14. {
  15.  
  16. }
  17. }
  18. public class MainActivity extends Activity {
  19.  
  20. public final static String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";
  21.  
  22.  
  23. @Override
  24. public void onCreate(Bundle savedInstanceState) {
  25. super.onCreate(savedInstanceState);
  26. setContentView(R.layout.activity_main);
  27. }
  28.  
  29. @Override
  30. public boolean onCreateOptionsMenu(Menu menu) {
  31. getMenuInflater().inflate(R.menu.activity_main, menu);
  32. return true;
  33. }
  34.  
  35.  
  36. public void sendMessage(View view) {
  37. Intent intent = new Intent(this, DisplayMessageActivity.class);
  38. EditText editText = (EditText) findViewById(R.id.edit_message);
  39. String message = editText.getText().toString();
  40. intent.putExtra(EXTRA_MESSAGE, message);
  41. startActivity(intent);
  42. }
  43.  
  44.  
  45. /* When the Radio Button is checked set the AGE
  46. variable accordingly to that value */
  47. /*public void onRadioButtonClicked(View view)
  48. {
  49. //Is the button now checked
  50. boolean checked = ((RadioButton) view).isChecked();
  51.  
  52. // Check which radio button was clicked
  53. switch(view.getId()) {
  54. case R.id.radio_Child:
  55. if (checked)
  56. break;
  57. case R.id.radio_Teenager:
  58. if (checked)
  59. break;
  60. case R.id.radio_Adult:
  61. if (checked)
  62. break;
  63. }
  64. }*/
  65. }
  66.  
  67.  
  68.  
Runtime error #stdin #stdout 0.04s 10832KB
stdin
Standard input is empty
stdout
Standard output is empty