Professional Documents
Culture Documents
T.Y.B.Sc(IT)
Advance Mobile Programming Journal
A.Y. 2023-24
(SEMESTER VI)
1|Page
Name: Simran Sabat Roll No : FIT2146
CERTIFICATE
This is to certify that Mr. / Miss. Simran Shrikant Sabat having Exam
Seat No./Roll No. FIT2146 of T.Y.BSc.IT (Semester VI) has completed the
Practical work in the subject of Advance Mobile Programming during the
academic Year 2023-24 under the guidance of Asst.Prof. Sneha Jadhav being
the partial requirement for the fulfillment of the curriculum of Degree of
Bachelor of Science in Information Technology, Elphinstone College, Dr. Homi
Bhabha State University.
2|Page
Name: Simran Sabat Roll No : FIT2146
INDEX
3|Page
Name: Simran Sabat Roll No : FIT2146
Practical No 1:
Aim: Building a simple Hello World Application.
Steps to Install Android Studio
Step – 1: Head over to bellow link to get the Android Studio executable or zip
file.
https://developer.android.com/studio/#downloads
Click on the “I have read and agree with the above terms and conditions”
checkbox followed by the download button.
4|Page
Name: Simran Sabat Roll No : FIT2146
Click on save file button in the appeared prompt box and the file will start
downloading.
Step – 3:After the downloading has finished, open the file from downloads and
run it. It will prompt the following dialogue box
5|Page
Name: Simran Sabat Roll No : FIT2146
Click on next.
In the next prompt it‟ll ask for a path for installation. Choose a path and hit next.
Step –4: It will start the installation, and once it is completed, it will be like the
image shown below
Click on next
Step – 5: Once “Finish” is clicked, it will ask whether the previous settings need
to be imported [if android studio had been installed earlier], or not.
It is better to choose the „Don‟t import Settings option‟.
6|Page
Name: Simran Sabat Roll No : FIT2146
Step – 7: After it has found the SDK components, it will redirect to the Welcome dialog box.
7|Page
Name: Simran Sabat Roll No : FIT2146
Click on next.
8|Page
Name: Simran Sabat Roll No : FIT2146
Choose Standard and click on Next. Now choose the theme, whether Light
theme or the Dark one. The light one is called the IntelliJ theme whereas the
dark theme is called Darcula. Choose as required.
9|Page
Name: Simran Sabat Roll No : FIT2146
Click on Finish.
The Android Studio has been successfully configured. Now it‟s time to launch
and build apps.
10 | P a g e
Name: Simran Sabat Roll No : FIT2146
If you have a project already opened, select File > New > New Project.
In the Choose your project window, select Empty Activity and click Next.
11 | P a g e
Name: Simran Sabat Roll No : FIT2146
After some processing time, the Android Studio main window appears.
Note
To Open Project Window
12 | P a g e
Name: Simran Sabat Roll No : FIT2146
13 | P a g e
Name: Simran Sabat Roll No : FIT2146
14 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output:
15 | P a g e
Name: Simran Sabat Roll No : FIT2146
Practical No 2:
Aim: Programming Resources Android Resources:(Color, Theme,
String, Drawable, Dimension, Image).
a. Defining Color Property.
1. Create a new project and go to:
ProjectName>App>src>main>res>values>colors.xml
2. Defining new color properties in colors.xml
3. Go to
4. ProjectName->app->res->values->colors.xml
Go to ProjectName->app->res->values->colors.xml
Colors.xml
<color name="Red">#FF0000</color>
<color name="Blue">#0000FF</color>
16 | P a g e
Name: Simran Sabat Roll No : FIT2146
<TextView android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="TextView" />
<TextView android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="TextView"
android:background="@color/Red"
<LinearLayout
android:layout_width="40
9dp"
android:layout_height="7
29dp"
android:orientation="verti
cal"
tools:layout_editor_absolu
teX="1dp"
tools:layout_editor_absolut
eY="1dp">
17 | P a g e
Name: Simran Sabat Roll No : FIT2146
<TextView
android:id="@+id/textV
iew"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="TextView"
android:background="@color/Red"
/>
<TextView android:id="@+id/textView2"
android:layout_width="match_parent"android:layout_height="52dp"
android:text="TextView"
android:background="@color/Grey"
/>
<TextView android:id="@+id/textView3"
android:layout_width="match_parent"android:layout_height="59dp"
android:text="TextView"
android:background="@color/Blue"
/>
<TextView android:id="@+id/textView4"
android:layout_width="match_parent"android:layout_height="51dp"
android:text="TextView"
android:background="@color/Cyan"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
18 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output
19 | P a g e
Name: Simran Sabat Roll No : FIT2146
<item name="android:textColor">#FFFFAA</item>
</style>
</resources>
Output
20 | P a g e
Name: Simran Sabat Roll No : FIT2146
strings.xml
<resources>
<string name="app_name">Prof. Shahid Ansari</string>
<string name="Heading">Programming Resources</string>
<string name="Description">Android is a mobile operating system developed by Google.It is
based on a modified version of the Linux kernel and other open source software, and is
designed primarily for touch screen mobile devicessuch as smart phones and tablets.
</string>
</resources>
android:text="@string/Heading"
android:textSize="24sp" />
<TextView android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/Grey"
android:text="@string/Description"
android:textSize="24sp" />
21 | P a g e
Name: Simran Sabat Roll No : FIT2146
d. Adding images and dimensions
Add a new dim.xml file and write the following code in dimens.xml
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<dimen name="textview_height">35dp</dimen>
<dimen name="textview_width">150dp</dimen>
<dimen name="font_size">26sp</dimen>
</resources>
22 | P a g e
Name: Simran Sabat Roll No : FIT2146
<LinearLayout android:layout_width="409dp"
android:layout_height="729dp"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp">
<ImageView android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Output
23 | P a g e
Name: Simran Sabat Roll No : FIT2146
Practical No 3:
Aim: Programming Activities and fragments
Activity Life Cycle, Activity methods, Multiple Activities, Life Cycle
of fragments and multiple fragments.
a) Activity Life Cycle
The various methods to be created are onStart(), onRestart(),
onStop(), onResume(),onDestroy() and onPause() as shown in
the figure.
24 | P a g e
Name: Simran Sabat Roll No : FIT2146
package MaharashtraCollege.example.profshahidansari;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends AppCompatActivity {
Output:
25 | P a g e
Name: Simran Sabat Roll No : FIT2146
package MaharashtraCollege.example.profshahidansari;
26 | P a g e
Name: Simran Sabat Roll No : FIT2146
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.util.Log;
private OnFragmentInteractionListener
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInsta
ceState);
if (getArguments() !=
null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup
container,Bundle savedInstanceState) {
27 | P a g e
Name: Simran Sabat Roll No : FIT2146
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
public void onStart()
{
super.onStart();
Log.d(tag,"In the onStart() event");
28 | P a g e
Name: Simran Sabat Roll No : FIT2146
}
public void onRestart()
{
Log.d(tag,"In the onRestart() event");
}
public void onPause()
{
super.onPause();
Log.d(tag,"In the onPause() event");
}
public void onStop()
{
super.onStop();
Log.d(tag,"In the onStop() event");
super.onDestroy();
29 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output:
30 | P a g e
Name: Simran Sabat Roll No : FIT2146
Practical No 4:
Aim: Program related to different layouts
Linear,Relative,Table.
a) Linear Layout in Android
LinearLayout is a ViewGroup that is responsible for holding views in
it. It is a layout that arranges its children i.e the various views and
layouts linearly (one after another) in a single column(vertically) or a
single row(horizontally).
Horizontal LinearLayout
In a horizontal LinearLayout, as the name suggests, the Views defined
inside the Linear Layout will be arranged horizontally one after another,
like in a row. By default, the orientation is set to horizontal.
But its a good practice to explicitly specify the orientation of the
linear layout by setting the attribute android:orientation with value
horizontal in the LinearLayout tag.
31 | P a g e
Name: Simran Sabat Roll No : FIT2146
Activity_main.xml
Remember
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
If you want horizontal layout just
android:layout_width="match_parent"
changeorientation to horizontal
android:layout_height="match_parent"
android:orientation="horizontal"
android:orientation="ver
tical"
tools:context=".MainActi
vity">
<EditText
android:id="@+id/edit
Text"
android:layout_width="wrap_con
tent"
android:layout_height="86dp"
android:layout_weight="1"
android:ems="10"
android:hint="Enter The Text"
android:inputType="textPersonN
ame"android:text="Type Here"
android:textColor="#FFEB3B" />
32 | P a g e
Name: Simran Sabat Roll No : FIT2146
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" You can also change the orientation
android:layout_weight="1" using attribute window as
android:text="Button" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
<item name="android:background">#000000</item>
<item name="android:textColor">#FFFFAA</item>
33 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output:
b) Relative Layout:
34 | P a g e
Name: Simran Sabat Roll No : FIT2146
Activity_main.xml
Remember
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<EditText
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Text Here" />
<Spinner
android:id="@+id/dates"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/name"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/times" />
<Spinner
android:id="@id/times"
android:layout_width="96dp"
android:layout_height="wrap_content"
android:layout_below="@id/name"
android:layout_alignParentRight="true" />
<Button
android:layout_width="96dp"
android:layout_height="wrap_content"
android:layout_below="@id/times"
android:layout_alignParentRight="true"
android:text="Click Here" />
</RelativeLayout>
35 | P a g e
Name: Simran Sabat Roll No : FIT2146
c) Table Layout:
Android TableLayout going to be arranged groups of views into rows
and columns. You will use the<TableRow> element to build a row in
the table. Each row has zero or more cells; each cell can hold one View
object.
TableLayout containers do not display border lines for their rows,
columns, or cells. The table will have as many columns as the row
with the most cells. A table can leave cells empty. Cells can span
multiple columns, as they can in HTML. You can span columns
by using the span field in the TableRow.LayoutParams class.
Main_activity.xml
Remember
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1">
<TableRow>
<TextView
android:layout_width="225dp"
android:layout_height="56dp"
android:padding="3dip"
android:text="Row1,Col1" />
<TextView
android:layout_height="match_parent"
android:gravity="right"
android:padding="3dip"
android:text="Row1,Col2" />
</TableRow>
<TableRow>
<TextView
android:layout_width="242dp"
android:layout_height="64dp"
android:padding="3dip"
android:text="Row2,Col1" />
<TextView
android:layout_height="match_parent"
android:gravity="right"
android:padding="3dip"
android:text="Row2,Col2" />
36 | P a g e
Name: Simran Sabat Roll No : FIT2146
</TableRow>
</TableLayout>
37 | P a g e
Name: Simran Sabat Roll No : FIT2146
Practical No 5:
Aim: Calculator Application
Activity main.xml
<LinearLayout
android:layout_width="match_parent
"
android:layout_height="match_parent
"android:orientation="vertical">
<EditText
android:id="
@+id/et1"
android:layout_width="match_pare
nt"android:layout_height="70dp"
android:ems="10"
android:inputType="textPersonNa
me"android:text="Input1" />
<EditText
android:id="
@+id/et2"
android:layout_width="match_pare
nt"android:layout_height="64dp"
android:ems="10"
android:inputType="textPersonNa
me"
android:text="Input2" />
<Button
android:id="@+i
d/btnAdd"
android:layout_width="matc
h_parent"
android:layout_height="wra
p_content"
38 | P a g e
Name: Simran Sabat Roll No : FIT2146
android:text="Addition" />
<Button
android:id="@+i
d/btnSub"
android:layout_width="matc
h_parent"
android:layout_height="wra
p_content"
android:text="Subtraction"
/>
<Button
android:id="@+i
d/btnMult"
android:layout_width="matc
h_parent"
android:layout_height="wra
p_content"
android:text="Multiplication
" />
<Button
android:id="@+i
d/btnDiv"
android:layout_width="matc
h_parent"
android:layout_height="wra
p_content"
android:text="Division" />
<Button
android:id="@+i
d/btnClear"
android:layout_width="matc
h_parent"
android:layout_height="wra
p_content"
android:text="Clear" />
<TextView
android:id="@+i
d/tv1"
android:layout_width="match_parent"
android:layout_height="63dp"
android:text="Output"
android:textColor="@android:color/background_dark"
android:textSize="18sp"
39 | P a g e
Name: Simran Sabat Roll No : FIT2146
android:textStyl
e="bold"
app:fontFamily
="casual" />
</LinearLayout>
</LinearLayout>
Main_Activity.java
package MaharashtraCollege.example.profshahidansari;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
EditText t1,t2;
Button b1,b2,b3,b4,b5;
TextView tv1;
int n1=0,n2=0;
String s1,s2;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
t1 = (EditText) findViewById(R.id.et1);
t2 = (EditText) findViewById(R.id.et2);
b1 = (Button) findViewById(R.id.btnAdd);
b2 = (Button) findViewById(R.id.btnSub);
b3 = (Button) findViewById(R.id.btnMult);
b4 = (Button) findViewById(R.id.btnDiv);
b5 = (Button) findViewById(R.id.btnClear);
b1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
40 | P a g e
Name: Simran Sabat Roll No : FIT2146
try {
String s1 = t1.getText().toString();
String s2 = t2.getText().toString();
n1 = Integer.parseInt(s1);
n2 = Integer.parseInt(s1);
int sum = n1 + n2;
tv1.setText("Addition ="+sum);
}
catch (NumberFormatException e)
{
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
String s1 = t1.getText().toString();
String s2 = t2.getText().toString();
n1 = Integer.parseInt(s1);
n2 = Integer.parseInt(s1);
int sub = n1 - n2;
tv1.setText("Subtraction ="+sub);
}
catch (NumberFormatException e)
{
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
String s1 = t1.getText().toString();
String s2 = t2.getText().toString();
n1 = Integer.parseInt(s1);
n2 = Integer.parseInt(s1);
int m = n1 * n2;
tv1.setText("Multiplication ="+m);
41 | P a g e
Name: Simran Sabat Roll No : FIT2146
}
catch (NumberFormatException e)
{
}
});
b4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
String s1 = t1.getText().toString();
String s2 = t2.getText().toString();
n1 = Integer.parseInt(s1);
n2 = Integer.parseInt(s1);
int d = n1 / n2;
tv1.setText("Division ="+d);
}
catch (NumberFormatException e)
{
}
});
b5.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
t1.setText(" ");
t2.setText(" ");
tv1.setText(" ");
}
});
}
}
42 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output:
43 | P a g e
Name: Simran Sabat Roll No : FIT2146
Practical No 6:
Aim: Programming menus and dialog
Creation of Menu:
Create a new project and go to,
Project > App -> src -> res(Right-click on res and select) ->
New -> Android Resource File -> Filename(menus) and Resource
Type Menu
Now go to, menus.xml file and make the following changes to
code file,
menus.xml
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<item android:id="@+id/newb" android:title="File" />
<item android:id="@+id/search" android:title="Open" />
<item android:id="@+id/save" android:title="Save"/>
<item android:id="@+id/Share" android:title="Save As" />
<item android:id="@+id/delete" android:title="Delete" />
<item android:id="@+id/Exit" android:title="Close" />
</menu>
44 | P a g e
Name: Simran Sabat Roll No : FIT2146
package MaharashtraCollege.example.profshahidansari;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
}
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.newb:
Toast.makeText(this,"File Selected",Toast.LENGTH_SHORT).show();
return true;
case R.id.Share:
Toast.makeText(this,"Open Selected",Toast.LENGTH_SHORT).show();
return true;
case R.id.delete:
Toast.makeText(this,"Save Selected",Toast.LENGTH_SHORT).show();
45 | P a g e
Name: Simran Sabat Roll No : FIT2146
return true;
case R.id.save:
Toast.makeText(this,"Save As Selected",Toast.LENGTH_SHORT).show();
return true;
case R.id.search:
Toast.makeText(this,"Delete Selected",Toast.LENGTH_SHORT).show();
return true;
case R.id.Exit: Toast.makeText(this,"Exit Selected",Toast.LENGTH_SHORT).show();
return true;
default:
Toast.makeText(this,"Default",Toast.LENGTH_SHORT).show();
return super.onOptionsItemSelected(item);
}
}
Output
46 | P a g e
Name: Simran Sabat Roll No : FIT2146
Creation of Dialog
Create a new project and go to, activity_main.xml, and make the
following additions to the code
Activity_main.xml
<Button android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/button_dialog"
android:onClick="onClickDialog"
android:text="Click to display an alert dialog"/>
<Button android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/button_progressdialog"
android:onClick="onClickProgressDialog"
android:text="Click to display a progressdialog"/>
<Button android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/button_datedialog"
android:onClick="onClickDateDialog"
android:text="Click to display a DatePicker dialog"/>
<Button android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/button_timedialog"
android:onClick="onClickTimeDialog"
android:text="Click to display a TImePicker dialog"/>
<TextView
android:id="@+id/textView_date"
android:layout_width="398dp"
android:layout_height="wrap_content"
47 | P a g e
Name: Simran Sabat Roll No : FIT2146
android:text="TextView1"
android:textSize="50dp" />
<TextView
android:id="@+id/textView_time"
android:layout_width="400dp"
android:layout_height="wrap_content"
android:text="TextView2"
android:textSize="50dp" />
</LinearLayout>
package MaharashtraCollege.example.profshahidansari;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.os.Bundle;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.app.TimePickerDialog;
import android.content.DialogInterface;
import android.view.View;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.TimePicker;
import android.widget.Toast;
CharSequence[] items={"Android","Security","Cloud"};
boolean[] itemsChecked=new boolean[items.length];
48 | P a g e
Name: Simran Sabat Roll No : FIT2146
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
49 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output:
50 | P a g e
Name: Simran Sabat Roll No : FIT2146
Practical No 7:
Aim: Programs on Intents, Events, Listeners and Adapters.
Create a new project and go to, activity_main.xml, and make the following
additions to the code
Activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/txt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="132dp"
android:ems="10"
android:hint="Enter Data"
android:inputType="textPersonName" />
<Button
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="Send" />
</RelativeLayout>
Main_Activity.java
51 | P a g e
Name: Simran Sabat Roll No : FIT2146
package MaharashtraCollege.example.profshahidansari;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import
android.view.View; import
android.widget.Button; import
android.widget.EditText;
t1;
Button b1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
t1=(EditText)findViewById(R.id.txt1);
b1=(Button)findViewById(R.id.btn1);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String data=t1.getText().toString();
Intent intent=new Intent(getApplicationContext(),DataRecieve.class);
intent.putExtra("data",data);
startActivity(intent);
}
});
}
}
52 | P a g e
Name: Simran Sabat Roll No : FIT2146
<TextView android:id="@+id/tv1"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="152dp"
android:layout_marginLeft="152dp"
android:layout_marginTop="161dp"
android:layout_marginEnd="132dp"
android:layout_marginRight="132dp" />
</RelativeLayout>
Data_Receive.java
package com.org.datapass.datapass;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
}
}
53 | P a g e
Name: Simran Sabat Roll No : FIT2146
Output:
54 | P a g e