Android Open Source - TheNewBoston Email






From Project

Back to project page TheNewBoston.

License

The source code is released under:

Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECI...

If you think the Android project TheNewBoston listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.homelysoft.thenewboston;
//w  w w .  j  a  v a  2  s.  c  o m
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Email extends Activity implements View.OnClickListener {
  EditText personsEmail, intro, personsName, stupidThings, hatefulAction,
      outro;
  String emailAdd, beginning, name, stupidAction, hatefulAct, out;
  Button sendEmail;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.email);
    bridgeXML();
    sendEmail.setOnClickListener(this);
  }

  private void bridgeXML() {

    personsEmail = (EditText) findViewById(R.id.et_emails);
    intro = (EditText) findViewById(R.id.et_intro);
    personsName = (EditText) findViewById(R.id.et_name);
    stupidThings = (EditText) findViewById(R.id.et_things);
    hatefulAction = (EditText) findViewById(R.id.et_action);
    outro = (EditText) findViewById(R.id.et_outro);
    sendEmail = (Button) findViewById(R.id.b_send_email);
  }

  public void onClick(View v) {
    convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated();
    String emailaddress[] = { emailAdd };
    String message = "Well hello "
        + name
        + " I just wanted to say "
        + beginning
        + ".  Not only that but I hate when you "
        + stupidAction
        + ", that just really makes me crazy.  I just want to make you "
        + hatefulAct
        + ".  Welp, thats all I wanted to chit-chatter about, oh and"
        + out
        + ".  Oh also if you get bored you should check out www.mybringback.com"
        + '\n' + "PS. I think I love you...   :(";
    Intent emailIntent=new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, emailaddress);
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, beginning);
    emailIntent.setType("plain/text");
    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
    startActivity(emailIntent);
  }

  private void convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated() {
    emailAdd = personsEmail.getText().toString();
    beginning = intro.getText().toString();
    name = personsName.getText().toString();
    stupidAction = stupidThings.getText().toString();
    hatefulAct = hatefulAction.getText().toString();
    out = outro.getText().toString();
  }

  @Override
  protected void onPause() {
    super.onPause();
    finish();
  }

}




Java Source Code List

com.homelysoft.thenewboston.AboutUs.java
com.homelysoft.thenewboston.Accelerate.java
com.homelysoft.thenewboston.Data.java
com.homelysoft.thenewboston.Email.java
com.homelysoft.thenewboston.ExternalData.java
com.homelysoft.thenewboston.Flipper.java
com.homelysoft.thenewboston.Home.java
com.homelysoft.thenewboston.HotOrNot.java
com.homelysoft.thenewboston.InternalData.java
com.homelysoft.thenewboston.OpenedClass.java
com.homelysoft.thenewboston.OurViewClient.java
com.homelysoft.thenewboston.Photo.java
com.homelysoft.thenewboston.Preferences.java
com.homelysoft.thenewboston.SQLView.java
com.homelysoft.thenewboston.SQLite.java
com.homelysoft.thenewboston.SharedPrefs.java
com.homelysoft.thenewboston.Slider.java
com.homelysoft.thenewboston.SoundPoolPlay.java
com.homelysoft.thenewboston.Splash.java
com.homelysoft.thenewboston.StartingPoint.java
com.homelysoft.thenewboston.Tabs.java
com.homelysoft.thenewboston.TextPlay.java
com.homelysoft.thenewboston.gfx.GFXSurface.java
com.homelysoft.thenewboston.gfx.GFX.java
com.homelysoft.thenewboston.gfx.MyBringBack.java
com.homelysoft.thenewboston.vect.Vector.java