SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
Android Studio Lab - Nithiyapriya Pasavaraj
Creation of simple Application using
Button, Text View & Edit Text
Step1:Select File -> New -> New Project. (Or) Select a new Android Studio Project
Step 2: Select Empty Activity from Create New Project Window & Click Next
Android Studio Lab - Nithiyapriya Pasavaraj
Step 3: Give Name as “SimpleApplication” ; Click on Folder icon to Select the location
where you wants to save your Application; select Language as “Java” and Select
Minimum API Level as “API22:Android 5.1 (Lollipop) and click Finish.
Once you gave Finish , the Gradle Starts to Sync & The Default Screen Appears as
below:MainActivity.java(app -> java -> package and open MainActivity.java)
Android Studio Lab - Nithiyapriya Pasavaraj
Activity_main.xml (app - >res -> layout -> xml (or) activity_main.xml)
App Design Layout
Step 4:Design the Application as follows with the given Property
Android Studio Lab - Nithiyapriya Pasavaraj
The Auto generated source code in xml seems as below. (Refer the xml code to check
/set the Properties of controls)
ativity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView3"
android:layout_width="273dp"
android:layout_height="63dp"
android:text="Simple Application"
android:textAlignment="center"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.068" />
<EditText
android:id="@+id/txtName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:ems="10"
android:hint="Enter Name"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/txtMail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.115"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.873" />
<EditText
android:id="@+id/txtMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="172dp"
android:layout_marginEnd="8dp"
android:ems="10"
android:hint="Enter MailId"
Android Studio Lab - Nithiyapriya Pasavaraj
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.115"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/txtPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="168dp"
android:layout_marginBottom="8dp"
android:ems="10"
android:hint="Enter Phone No"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/btnSubmit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.954"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.952" />
<Button
android:id="@+id/btnSubmit"
android:layout_width="174dp"
android:layout_height="64dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="244dp"
android:background="#8BC34A"
android:text="Button"
android:textColor="#9C27B0"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.402"
app:layout_constraintStart_toStartOf="parent"
tools:text="SUBMIT" />
<TextView
android:id="@+id/DisTextView"
android:layout_width="346dp"
android:layout_height="160dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="36dp"
android:layout_marginBottom="44dp"
android:background="#CDDC39"
android:text="Display Input Data in TextView"
android:textAllCaps="false"
android:textColor="#FF5722"
android:textSize="30sp"
android:textStyle="bold|italic"
Android Studio Lab - Nithiyapriya Pasavaraj
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnSubmit"
app:layout_constraintVertical_bias="0.575" />
</androidx.constraintlayout.widget.ConstraintLayout>
Step 5: Type the Given Code in “MainActivity.java”
package com.example.simpleapplication;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final TextView textView = (TextView ) findViewById(R.id.txtDisplay);
final EditText name = (EditText) findViewById(R.id.txtName);
final EditText mail=(EditText) findViewById(R.id.txtMail);
final EditText phone=(EditText) findViewById(R.id.txtPhone);
Button displayText=(Button) findViewById(R.id.btnSubmit);
displayText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(name.getText().toString()!=null)
{
textView.setText("Name :"+name.getText().toString()+"n"+"eMail
:"+mail.getText().toString()+"n"+"PhoneNo :"+phone.getText().toString());
textView.setTextSize(20);
}
}
});
}
}
Android Studio Lab - Nithiyapriya Pasavaraj
step 6: Save the Application & Goto Build -> Make Project;
Step 7: Once you got “Build :Completed Successfully Goto Run menu to Run the App.
Android Studio Lab - Nithiyapriya Pasavaraj

More Related Content

What's hot (20)

PPTX
interface in c#
Deepti Pillai
 
PPTX
Grails and Ajax
TO THE NEW | Technology
 
DOC
Step by step exercise for bw 365
Siva Pradeep Bolisetti
 
PDF
Example for Virtual and Pure Virtual function.pdf
rajaratna4
 
PDF
Abap object-oriented-programming-tutorials
cesarmendez78
 
PDF
Beginner's Guide: Programming with ABAP on HANA
Ashish Saxena
 
PPTX
jQuery
Vishwa Mohan
 
PDF
CSS Grid
Digital Surgeons
 
PPTX
Core Data Service
Sujoy Saha
 
PPSX
computer language - Html frames
Dr. I. Uma Maheswari Maheswari
 
PPT
User exit training
Jen Ringel
 
PPTX
Html form tag
shreyachougule
 
PPT
Chapter 01 user exits
Kranthi Kumar
 
PPTX
SAX
Tilakpoudel2
 
PDF
Beginner’s guide to sap abap 1
Panduka Bandara
 
PDF
Abap reports
Milind Patil
 
PPTX
Java script
Shyam Khant
 
ODP
JUDCon London 2011 - Bin packing with drools planner by example
Geoffrey De Smet
 
PPTX
SAP BADI Implementation Learning for Functional Consultant
Ankit Sharma
 
PDF
Web technology practical list
desaipratu10
 
interface in c#
Deepti Pillai
 
Grails and Ajax
TO THE NEW | Technology
 
Step by step exercise for bw 365
Siva Pradeep Bolisetti
 
Example for Virtual and Pure Virtual function.pdf
rajaratna4
 
Abap object-oriented-programming-tutorials
cesarmendez78
 
Beginner's Guide: Programming with ABAP on HANA
Ashish Saxena
 
jQuery
Vishwa Mohan
 
Core Data Service
Sujoy Saha
 
computer language - Html frames
Dr. I. Uma Maheswari Maheswari
 
User exit training
Jen Ringel
 
Html form tag
shreyachougule
 
Chapter 01 user exits
Kranthi Kumar
 
Beginner’s guide to sap abap 1
Panduka Bandara
 
Abap reports
Milind Patil
 
Java script
Shyam Khant
 
JUDCon London 2011 - Bin packing with drools planner by example
Geoffrey De Smet
 
SAP BADI Implementation Learning for Functional Consultant
Ankit Sharma
 
Web technology practical list
desaipratu10
 

Similar to Creation of simple application using - step by step (20)

PDF
Basics and different xml files used in android
Mahmudul Hasan
 
PDF
Android studio
Andri Yabu
 
PDF
Android Lab
Leo Nguyen
 
PPT
Appium
Keshav Kashyap
 
PPTX
Lecture #1 Creating your first android project
Vitali Pekelis
 
PPTX
Android Tutorials : Basic widgets
Prajyot Mainkar
 
PDF
Android app development guide for freshers by ace web academy
Ace Web Academy -Career Development Center
 
ODP
Android introduction
PingLun Liao
 
DOCX
Leture5 exercise onactivities
maamir farooq
 
DOCX
Lecture exercise on activities
maamir farooq
 
PDF
Android App development and test environment, Understaing android app structure
Vijay Rastogi
 
PDF
Android tutorial
Abid Khan
 
PPTX
Mobile Application Development-Components and Layouts
Dr. Chandrakant Divate
 
PPTX
Write an application that draws basic graphical primitives.pptx
vishal choudhary
 
PPTX
Hello android example.
Rahul Rana
 
PDF
Getting started with appium
Pratik Patel
 
PPT
Beginning Native Android Apps
Gil Irizarry
 
PDF
Appium understanding document
Akshay Pillay
 
KEY
Android Workshop
Junda Ong
 
PPTX
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Eng Teong Cheah
 
Basics and different xml files used in android
Mahmudul Hasan
 
Android studio
Andri Yabu
 
Android Lab
Leo Nguyen
 
Lecture #1 Creating your first android project
Vitali Pekelis
 
Android Tutorials : Basic widgets
Prajyot Mainkar
 
Android app development guide for freshers by ace web academy
Ace Web Academy -Career Development Center
 
Android introduction
PingLun Liao
 
Leture5 exercise onactivities
maamir farooq
 
Lecture exercise on activities
maamir farooq
 
Android App development and test environment, Understaing android app structure
Vijay Rastogi
 
Android tutorial
Abid Khan
 
Mobile Application Development-Components and Layouts
Dr. Chandrakant Divate
 
Write an application that draws basic graphical primitives.pptx
vishal choudhary
 
Hello android example.
Rahul Rana
 
Getting started with appium
Pratik Patel
 
Beginning Native Android Apps
Gil Irizarry
 
Appium understanding document
Akshay Pillay
 
Android Workshop
Junda Ong
 
Learn Xamarin Absolute Beginners - Permissions, Building the App GUI & Menus
Eng Teong Cheah
 
Ad

More from priya Nithya (19)

PPTX
Android Architecture.pptx
priya Nithya
 
PDF
Html server control - ASP. NET with c#
priya Nithya
 
PPTX
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
priya Nithya
 
PPTX
Asynchronous data transfer
priya Nithya
 
PDF
Asp.net state management
priya Nithya
 
DOC
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
priya Nithya
 
DOCX
HTML SERVER CONTROL - ASP.NET WITH C#
priya Nithya
 
DOC
Android LAb - Creating an android app with Radio button
priya Nithya
 
PPTX
ASP.NET - Life cycle of asp
priya Nithya
 
DOC
Web application using c# Lab - Web Configuration file
priya Nithya
 
PPSX
Adaptation of tcp window
priya Nithya
 
PPSX
Asp.net Overview
priya Nithya
 
PPSX
Key mechanism of mobile ip
priya Nithya
 
PPSX
Mobile ip overview
priya Nithya
 
PPSX
Features of mobile ip
priya Nithya
 
PDF
Creating a Name seperator Custom Control using C#
priya Nithya
 
PDF
How to Create Database component -Enterprise Application Using C# Lab
priya Nithya
 
PDF
Creating simple component
priya Nithya
 
PPT
Internet (i mcom)
priya Nithya
 
Android Architecture.pptx
priya Nithya
 
Html server control - ASP. NET with c#
priya Nithya
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
priya Nithya
 
Asynchronous data transfer
priya Nithya
 
Asp.net state management
priya Nithya
 
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
priya Nithya
 
HTML SERVER CONTROL - ASP.NET WITH C#
priya Nithya
 
Android LAb - Creating an android app with Radio button
priya Nithya
 
ASP.NET - Life cycle of asp
priya Nithya
 
Web application using c# Lab - Web Configuration file
priya Nithya
 
Adaptation of tcp window
priya Nithya
 
Asp.net Overview
priya Nithya
 
Key mechanism of mobile ip
priya Nithya
 
Mobile ip overview
priya Nithya
 
Features of mobile ip
priya Nithya
 
Creating a Name seperator Custom Control using C#
priya Nithya
 
How to Create Database component -Enterprise Application Using C# Lab
priya Nithya
 
Creating simple component
priya Nithya
 
Internet (i mcom)
priya Nithya
 
Ad

Recently uploaded (20)

PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 

Creation of simple application using - step by step

  • 1. Android Studio Lab - Nithiyapriya Pasavaraj Creation of simple Application using Button, Text View & Edit Text Step1:Select File -> New -> New Project. (Or) Select a new Android Studio Project Step 2: Select Empty Activity from Create New Project Window & Click Next
  • 2. Android Studio Lab - Nithiyapriya Pasavaraj Step 3: Give Name as “SimpleApplication” ; Click on Folder icon to Select the location where you wants to save your Application; select Language as “Java” and Select Minimum API Level as “API22:Android 5.1 (Lollipop) and click Finish. Once you gave Finish , the Gradle Starts to Sync & The Default Screen Appears as below:MainActivity.java(app -> java -> package and open MainActivity.java)
  • 3. Android Studio Lab - Nithiyapriya Pasavaraj Activity_main.xml (app - >res -> layout -> xml (or) activity_main.xml) App Design Layout Step 4:Design the Application as follows with the given Property
  • 4. Android Studio Lab - Nithiyapriya Pasavaraj The Auto generated source code in xml seems as below. (Refer the xml code to check /set the Properties of controls) ativity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout 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" tools:context=".MainActivity"> <TextView android:id="@+id/textView3" android:layout_width="273dp" android:layout_height="63dp" android:text="Simple Application" android:textAlignment="center" android:textSize="24sp" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="0.497" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.068" /> <EditText android:id="@+id/txtName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:layout_marginBottom="8dp" android:ems="10" android:hint="Enter Name" android:inputType="textPersonName" app:layout_constraintBottom_toTopOf="@+id/txtMail" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.115" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.873" /> <EditText android:id="@+id/txtMail" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="172dp" android:layout_marginEnd="8dp" android:ems="10" android:hint="Enter MailId"
  • 5. Android Studio Lab - Nithiyapriya Pasavaraj android:inputType="textPersonName" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.115" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <EditText android:id="@+id/txtPhone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="168dp" android:layout_marginBottom="8dp" android:ems="10" android:hint="Enter Phone No" android:inputType="textPersonName" app:layout_constraintBottom_toTopOf="@+id/btnSubmit" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.954" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.952" /> <Button android:id="@+id/btnSubmit" android:layout_width="174dp" android:layout_height="64dp" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:layout_marginBottom="244dp" android:background="#8BC34A" android:text="Button" android:textColor="#9C27B0" android:textSize="24sp" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.402" app:layout_constraintStart_toStartOf="parent" tools:text="SUBMIT" /> <TextView android:id="@+id/DisTextView" android:layout_width="346dp" android:layout_height="160dp" android:layout_marginTop="8dp" android:layout_marginEnd="36dp" android:layout_marginBottom="44dp" android:background="#CDDC39" android:text="Display Input Data in TextView" android:textAllCaps="false" android:textColor="#FF5722" android:textSize="30sp" android:textStyle="bold|italic"
  • 6. Android Studio Lab - Nithiyapriya Pasavaraj app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/btnSubmit" app:layout_constraintVertical_bias="0.575" /> </androidx.constraintlayout.widget.ConstraintLayout> Step 5: Type the Given Code in “MainActivity.java” package com.example.simpleapplication; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final TextView textView = (TextView ) findViewById(R.id.txtDisplay); final EditText name = (EditText) findViewById(R.id.txtName); final EditText mail=(EditText) findViewById(R.id.txtMail); final EditText phone=(EditText) findViewById(R.id.txtPhone); Button displayText=(Button) findViewById(R.id.btnSubmit); displayText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(name.getText().toString()!=null) { textView.setText("Name :"+name.getText().toString()+"n"+"eMail :"+mail.getText().toString()+"n"+"PhoneNo :"+phone.getText().toString()); textView.setTextSize(20); } } }); } }
  • 7. Android Studio Lab - Nithiyapriya Pasavaraj step 6: Save the Application & Goto Build -> Make Project; Step 7: Once you got “Build :Completed Successfully Goto Run menu to Run the App.
  • 8. Android Studio Lab - Nithiyapriya Pasavaraj