//http://www.forejune.com/
package gui.simplegui;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

public class GuiMain extends Activity 
{
  public final static String EXTRA_MESSAGE = "gui.simplegui.MESSAGE";
  @Override
  protected void onCreate(Bundle savedInstanceState) 
  {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.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.gui_main, menu);
    return true;
  }

  public void transmitMessage( View view )
  {
    Intent intent = new Intent(this, MessageActivity.class);
    EditText editText = (EditText) findViewById(R.id.message_box);
    String message = editText.getText().toString();
    intent.putExtra(GuiMain.EXTRA_MESSAGE, message);
    startActivity(intent);
  }
}
