Guest

Untitled

By: a guest on Jan 28th, 2012  |  syntax: Java  |  size: 2.21 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. import com.gta5news.lewis.R;
  2.  
  3. import android.app.Activity;
  4. import android.os.Bundle;
  5. import android.view.View;
  6. import android.widget.Button;
  7. import android.widget.EditText;
  8. public class Email extends Activity implements View.OnClickListener {
  9.         EditText personsEmail, intro, personsName, stupidThings, hatefulAction,
  10.                         outro;
  11.         String emailAdd, beginning, name, stupidAction, hatefulAct, out;
  12.         Button sendEmail;
  13.         @Override
  14.         protected void onCreate(Bundle savedInstanceState) {
  15.                 // TODO Auto-generated method stub
  16.                 super.onCreate(savedInstanceState);
  17.                 setContentView(R.layout.email);
  18.                 initializeVars();
  19.                 sendEmail.setOnClickListener(this);
  20.         }
  21.         private void initializeVars() {
  22.                 // TODO Auto-generated method stub
  23.                 personsEmail = (EditText) findViewById(R.id.etEmails);
  24.                 intro = (EditText) findViewById(R.id.etIntro);
  25.                 personsName = (EditText) findViewById(R.id.etName);
  26.                 stupidThings = (EditText) findViewById(R.id.etThings);
  27.                 hatefulAction = (EditText) findViewById(R.id.etAction);
  28.                 outro = (EditText) findViewById(R.id.etOutro);
  29.                 sendEmail = (Button) findViewById(R.id.bSentEmail);
  30.         }
  31.         public void onClick(View v) {
  32.                 // TODO Auto-generated method stub
  33.                 convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated();
  34.                 String emailaddress[] = { emailAdd };
  35.                 String message = "Well hello "
  36.                                 + name
  37.                                 + " I just wanted to say "
  38.                                 + beginning
  39.                                 + ".  Not only that but I hate when you "
  40.                                 + stupidAction
  41.                                 + ", that just really makes me crazy.  I just want to make you "
  42.                                 + hatefulAct
  43.                                 + ".  Welp, thats all I wanted to chit-chatter about, oh and"
  44.                                 + out
  45.                                 + ".  Oh also if you get bored you should check out "
  46.                                 + '\n' + "PS. I think I love you...    ";
  47.         }
  48.         private void convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated() {
  49.                 // TODO Auto-generated method stub
  50.                 emailAdd = personsEmail.getText().toString();
  51.                 beginning = intro.getText().toString();
  52.                 name = personsName.getText().toString();
  53.                 stupidAction = stupidThings.getText().toString();
  54.                 hatefulAct = hatefulAction.getText().toString();
  55.                 out = outro.getText().toString();
  56.         }
  57.         @Override
  58.         protected void onPause() {
  59.                 // TODO Auto-generated method stub
  60.                 super.onPause();
  61.                 finish();
  62.         }
  63. }