Android Program – Email Activity

ANDROID FOR FRESHER

Android Program Email Activity

 

Java Code(EmailAct)

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

public class EmailAct extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_email);
}

public void email_send(View v)
{
Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_TEXT,”Hello \n \n \n \n \n” +
” \n” +
” \n” +
” \n \n” +
” \n” +
” \n” +
” \n Best Regards “);
i.setType(“text/html”); // MIME type

Intent i1 = Intent.createChooser(i,”Select the Best”);
startActivity(i1);
}
 }

Layout XML Code( activity_email)

<?xml version=”1.0″ encoding=”utf-8″?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
xmlns:tools=”http://schemas.android.com/tools”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:paddingBottom=”@dimen/activity_vertical_margin”
android:paddingLeft=”@dimen/activity_horizontal_margin”
android:paddingRight=”@dimen/activity_horizontal_margin”
android:orientation=”vertical”
android:paddingTop=”@dimen/activity_vertical_margin”
tools:context=”com.andro.tech.androidproject.EmailAct”>

<TextView
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:textSize=”@dimen/textsize”
android:layout_gravity=”center”
android:textStyle=”bold”
android:text=”Email”
android:layout_marginBottom=”150dp” />

<Button
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:layout_gravity=”center”
android:text=”SEND”
android:onClick=”email_send”
android:layout_marginBottom=”150dp”/>

<Button
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:text=”@string/sourcecode”
android:background=”@color/bgcolor”
android:textStyle=”bold”
android:textColor=”@color/text”
android:onClick=”view1″/>

</LinearLayout>

 

Output

       

Android email snippet activity code download

Download Android Email Activity Source Code


For More Android Programs –Click Here

 

Follow Us – Never Miss Update

Fb/PageTwitterGoogle+InstagramPinterest 

 

Related Search

android email snippet activity code download, Android email activity code download, android email snippet code download, android email sending code download, android email java code download, email snippet for android dwonload, android email snippet activity code download, android email snippet activity source code, android email java code for sending mail, email activity java code android, android email open code download

Comments

One thought on “Android Program – Email Activity”

Honor X7b with 108MP Camera, 6000mAh Battery Launched Globally Tecno Spark 20 Unveiled: 90Hz Display, 50MP Camera, and Helio G85 App Store Awards 2023: The Best Apps and Games Telangana Exit Polls 2023: Congress Likely to Win 58-67 Seats Poco X6 Pro 5G is coming as a rebranded Redmi K70e globally?
%d bloggers like this: