You are on page 1of 35

UNIT CONVERTER APPLICATION INTRODUCTION

CHAPTER-1
INTRODUCTION
1.1 What is Android?

Android is an operating system and programming platform developed by Google for


smartphones and other mobile devices (such as tablets). It can run on many different devices
from many different manufacturers. Android includes a software development kit for writing
original code and assembling software modules to create apps for Android users. It also provides
a marketplace to distribute apps. Altogether, Android represents an ecosystem for mobile apps.

Apps are developed for a variety of reasons: addressing business requirements, building
new services, creating new businesses, and providing games and other types of content for users.
Developers choose to develop for Android to reach most mobile device users.

Use the Android software development kit (SDK) to develop apps that take advantage of
the Android operating system and UI. The SDK includes a comprehensive set of development
tools including a debugger, software libraries of prewritten code, a device emulator,
documentation, sample code, and tutorials. To develop apps using the SDK, use the Java
programming language for developing the app and Extensible Mark-up Language (XML) files
for describing data resources. To develop the apps efficiently, Google offers a full Java
Integrated Development Environment (IDE) called Android Studio, with advanced features for
developing, debugging, and packaging Android apps.

Fig 1: The stack of Android Open- Source Project

Dept of CSE, Dr. TTIT, KGF 1 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

Dept of CSE, Dr. TTIT, KGF 1 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

 Android Architecture Diagram:

Android operating system is roughly divided into five sections and four main layers as
shown below in the architecture diagram.

Fig 2: Android Architecture

Dept of CSE, Dr. TTIT, KGF 2 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

 Java API Framework:


Android framework includes Android API's such as UI (User Interface), telephony,
resources, locations, Content Providers (data) and package managers. It provides a lot of classes
and interfaces for android application development.
 View System: Used to build an app's UI, including lists, buttons, and menus.

 Resource Manager: Used to access to non-code resources such as localized strings,


graphics, and layout files.
 Notification Manager: Used to display custom alerts in the status bar.
 Activity Manager: That manages the lifecycle of apps.
 Content Providers: That enables apps to access data from other apps.

 Libraries and Android Runtime:

Native libraries such as Web Kit, OpenGL, Free Type, SQLite, Media, C runtime library
etc.
 The Web Kit library is responsible for browser support.

 SQLite is for database

 Free Type for font support

 Media for playing and recording audio and video formats.

 SSL libraries responsible for Internet security

 Android Runtime:

In android runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is
responsible to run android application. DVM is like JVM, but it is optimized for mobile devices.
It consumes less memory and provides fast performance.
 Linux kernel:

It is the heart of android architecture that exists at the root of android architecture. Linux
kernel is responsible for device drivers, power management, memory management, device
management like camera, keypad, display etc. and resource access.

Dept of CSE, Dr. TTIT, KGF 3 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

 Android Versions:

Version Initial release API


Code name
Number date level
(Version Name)
September 23,
(No codename) 1.0 1
2008
(Internally known as "Petit Four") February 9,
1.1 2009 2
Cupcake 1.5 April 27, 3
2009
Donut 1.6 September 15, 4
2009
Eclair 2.0 – 2.1 October 26, 5–7
2009
Froyo 2.2 – 2.2.3 May 20, 8
2010
Gingerbread 2.3 – 2.3.7 December 6, 9 – 10
2010
Honeycomb 3.0 – 3.2.6 February 22, 11 – 13
2011
Ice Cream Sandwich 4.0 – 4.0.4 October 18, 14 – 15
2011
Jelly Bean 4.1 – 4.3.1 July 9, 16 – 18
2012
KitKat 4.4 – 4.4.4 October 31, 19 – 20
2013
Lollipop 5.0 – 5.1.1 November 12, 21 – 22
2014
Marshmallow 6.0 – 6.0.1 October 5, 23
2015
Nougat 7.0 – 7.1.2 August 22, 24 – 25
2016
Oreo 8.0-8.1 August 21, 26-27
2017
Pie 9.0 August 6, 28
2018
Android 10 10.0 September 3, 29
2019
Android 11 11 September 8, 30
2020

Table 1: Android Versions

Dept of CSE, Dr. TTIT, KGF 4 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

1.2 What is XML?

XML stands for Extensible Markup Language. It is a text-based markup language derived
from Standard Generalized Markup Language (SGML).XML tags identify the data and are used
to store and organize the data, rather than specifying how to display it like HTML tags, which
are used to display the data. XML is not going to replace HTML soon, but it introduces new
possibilities by adopting many successful features of HTML.

There are three important characteristics of XML that make it useful in a variety of systems
and solutions –
 XML is extensible − XML allows you to create your own self-descriptive tags, or
language, that suits your application.
 XML carries the data, does not present it − XML allows you to store the
data irrespective of how it will be presented.
 XML is a public standard − XML was developed by an organization called the
World Wide Web Consortium (W3C) and is available as an open standard.

 XML Usage:
A short list of XML usage says it all −
 XML can work behind the scenes to simplify the creation of HTML documents for
large web sites.
 XML can be used to exchange the information between organizations and systems.
 XML can be used for offloading and reloading of databases.
 XML can be used to store and arrange the data, which can customize your data
handling needs.
 XML can easily be merged with style sheets to create almost any desired output.
 Virtually, any type of data can be expressed as an XML document.

 MARKUP:

XML is a markup language that defines set of rules for encoding documents in a format that
is both human-readable and machine-readable. Markup is information added to a document

Dept of CSE, Dr. TTIT, KGF 5 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

that enhances its meaning in certain ways, in that it identifies the parts and how they relate to
each other. More specifically, a markup language is a set of symbols that can be placed in the
text of a document to demarcate and label the parts of that document.
Following example shows how XML markup looks, when embedded in a piece of text −
<message>
<text> Hello, world! </text>
</message>
This snippet includes the markup symbols, or the tags such as <message>...</message> and
<text>... </text>. The tags <message> and </message> mark the start and the end of the XML code
fragment. The tags <text> and </text> surround the text Hello, world!
Following is a complete XML document −
<?xml version = "1.0"?>
<contact-info>
<name> XYZ </name>
<company> Dr. TTIT </company>
<phone>(+91)123-4567-890</phone>
</contact-info>
The following diagram depicts the syntax rules to write different types of markup and text
in an XML document.

Fig 3: XML Syntax

Dept of CSE, Dr. TTIT, KGF 6 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

 XML DECLARATION:

It’s The XML document can optionally have an XML declaration. It is written as follows:
<?xml version = "1.0" encoding = "UTF-8"?>

where version is the XML version and encoding specifies the character encoding used in the
document.

Syntax Rules for XML Declaration:

 The XML declaration is case sensitive and must begin with "<?xml>" where "xml"
is written in lower-case.

 If document contains XML declaration, then it strictly needs to be the first statement of
the XML document.

 The XML declaration strictly needs be the first statement in the XML document.

 An HTTP protocol can override the value of encoding that you put in the XML declaration.
 Tags and Elements:

An XML file is structured by several XML-elements, also called XML-nodes or XML-


tags. The names of XML-elements are enclosed in triangular brackets < > as shown below –
<element>

Syntax Rules for Tags and Elements

Element Syntax − Each XML-element needs to be closed either with start or with end
elements as shown below −

<element>....</element>

or in simple-cases, just this way –

<element/>

Nesting of Elements − An XML-element can contain multiple XML-elements as its children,


but the children elements must not overlap. i.e., an end tag of an element must have the same
name as that of the most recent unmatched start tag.

Dept of CSE, Dr. TTIT, KGF 7 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

The Following example shows correct nested tags –


<?xml version = "1.0"?>
<contact-info>
<company>Tutorials Point</company>
<contact-info>

Root Element − An XML document can have only one root element. For example, following
is not a correct XML document, because both the x and y elements occur at the top level
without a root element –
<x>...</x>
<y>...</y>

The Following example shows a correctly formed XML document –

<root>
<x>...</x>
<y>...</y>
</root>
 XML ATTRIBUTES:

An attribute specifies a single property for the element, using a name/value pair. An XML-
element can have one or more attributes. For example −

<a href = "http://www.tutorialspoint.com/">Tutorialspoint!</a>

here href is the attribute name and http://www.tutorialspoint.com/ is attribute value.

Syntax Rules for XML Attributes

 Attribute names in XML (unlike HTML) are case sensitive. That is, HREF and href are
considered two different XML attributes.

 Same attribute cannot have two values in a syntax. The following example shows
incorrect syntax because the attribute b is specified twice

<a b = "x" c = "y" b = "z">....</a>

Dept of CSE, Dr. TTIT, KGF 8 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

 Attribute names are defined without quotation marks, whereas attribute values must
always appear in quotation marks. Following example demonstrates incorrect xml syntax

<a b = x>....</a>

In the above syntax, the attribute value is not defined in quotation marks.
 XML Text:

The names of XML-elements and XML-attributes are case-sensitive, which means the name of
start and end elements need to be written in the same case. To avoid character encoding problems, all
XML files should be saved as Unicode UTF-8 or UTF-16 files.

Whitespace characters like blanks, tabs and line-breaks between XML-elements and between
the XML-attributes will be ignored.

Some characters are reserved by the XML syntax itself. Hence, they cannot be used directly.
To use them, some replacement-entities are used, which are listed below –

Not Allowed Character Replacement Entity Character Description

< &lt; less than

> &gt; greater than

& &amp; ampersand

‘ &apos; apostrophe

“ &quot; quotation

Table 2: Replacement Entities in XML

Dept of CSE, Dr. TTIT, KGF 9 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

1.3 What is Android Studio?

Android Studio is the official integrated development environment (IDE) for Google's
Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically
for Android development. It is available for download on Windows, macOS and Linux based
operating systems or as a subscription-based service in 2020. It is a replacement for the Eclipse
Android Development Tools (E-ADT) as the primary IDE for native Android application
development.

Android Studio was announced on May 16, 2013, at the Google I/O conference. It was in
early access preview stage starting from version 0.1 in May 2013, then entered beta stage starting
from version 0.8 which was released in June 2014. The first stable build was released in
December 2014, starting from version 1.0.

On May 7, 2019, Kotlin replaced Java as Google's preferred language for Android app
development.[13] Java is still supported, as is C++.[14]A specific feature of the Android Studio
is an absence of the possibility to switch autosave feature off.

The following features are provided in the current stable version:

 Gradle-based build support

 Android-specific refactoring and quick fixes

 Lint tools to catch performance, usability, version compatibility and other problems

 Pro Guard integration and app-signing capabilities

 Template-based wizards to create common Android designs and components

 Built-in support for Google Cloud Platform, enabling integration with Firebase
Cloud Messaging (Earlier 'Google Cloud Messaging') and Google App Engine

 Android Virtual Device (Emulator) to run and debug apps in the Android studio.

DEPT.OF.CSE, DR. TTIT, KGF 10 2020-21


UNIT CONVERTER APPLICATION INTRODUCTION

Android Studio supports all the same programming languages of IntelliJ (and CLion) e.g.,
Java, C++, and more with extensions, such as Go; and Android Studio 3.0 or later supports
Kotlin and "all Java 7 language features and a subset of Java 8 language features that vary by
platform version." External projects backport some Java 9 features. While IntelliJ states that
Android Studio supports all released Java versions, and Java 12, it's not clear to what level
Android Studio supports Java versions up to Java 12 (the documentation mentions partial Java 8
support). At least some new language features up to Java 12 are usable in Android.

Once an app has been compiled with Android Studio, it can be published on the Google Play
Store. The application must be in line with the Google Play Store developer content policy.

Fig 4: Android Studio

DEPT.OF.CSE, DR. TTIT, KGF 11 2020-21


UNIT CONVERTER ANDROID APPLICATION REQUIREMENT SPECIFICATIONS

CHAPTER-2
REQUIREMENTS SPECIFICATIONS
You can download Android Studio from the Android Studio home page,
(https://developer.android.com/studio/index.html) where you will also find the traditional SDKs
with Android Studio’s command-line tools.
Before downloading Android Studio, make sure your platform meets the following
requirements:

2.1 WINDOWS REQUIREMENTS:

 Microsoft Windows 7/8/10 (32-bit or 64-bit)

 3 GB RAM minimum and 1 GB OF available disk space

 1280 * 800 minimum screen resolution

 JDK 8 or higher versions

2.2 LINUX REQUIREMENTS:


 GNOME or KDE desktop, 64-bit distribution capable of running 32-bit applications

 GNU C library (glib) 2.19 or later

 3 GB RAM minimum and 1 GB of available disk space

    minimum screen resolution

 JDK 8 or higher versions

DEPT.OF.CSE, DR. TTIT, KGF 12 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

CHAPTER 3

DESIGN
3.1 LAYOUTS:

 Text View:

Text View refers to the widget which displays some text on the screen based on the
layout, size, color, etc set for that Text View. It optionally allows us to modify or edit itself as
well.

<Text View>

android: SomeAttribute1 = "Value of

attribute1" android: SomeAttribute2 = "Value

of attribute2"

android:SomeAttributeN = "Value of attributeN"

</Text View>

 Image View:

Image View class is used to display any kind of image resource in the android application
either it can be android. Graphics. Bitmap or android.graphics.drawable.Application of Image
View is also in applying tints to an image to reuse a drawable resource and create overlays on
background images. Moreover, Image View is also used to control the size and movement of an
image.

<Image View>

android: SomeAttribute1 = "Value of

attribute1" android: SomeAttribute2 = "Value

of attribute2"

DEPT.OF.CSE, DR. TTIT, KGF 13 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

android:SomeAttributeN = "Value of attributeN"

</Image View>

 Button :

Button represents a push-button. The android.widget.Button is subclass of TextView class


and CompoundButton is the subclass of Button class.

There are different types of buttons in android such as RadioButton, ToggleButton,


CompoundButton etc.

<Button>
android:SomeAttribute1 = "Value of
attribute1" android:SomeAttribute2 = "Value
of attribute2"
.
android:SomeAttributeN = "Value of attributeN"
</Button>

 TextClock :

TextClock can display the current date and/or time as a formatted string. This view honors
the 24-hour format system setting. As such, it is possible and recommended to provide two
different formatting patterns: one to display the date/time in 24-hour mode and one to display the
date/time in 12-hour mode. Most callers will want to use the defaults, though, which will be
appropriate for the user's locale.ng.

<TextClock>

android:SomeAttribute1 = "Value of

attribute1" android:SomeAttribute2 = "Value

of attribute2"

DEPT.OF.CSE, DR. TTIT, KGF 13 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

android:SomeAttributeN = "Value of attributeN"

</TextClock>

DEPT.OF.CSE, DR. TTIT, KGF 13 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

3.2 LAYOUTS IN THE PROJECT:

TABLE : DATE ATTRIBUTES TABLE : CLOCK ATTRIBUTES

TABLE : TITLE ATTRIBUTES

DEPT.OF.CSE, DR. TTIT, KGF 15 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

TABLE : START BUTTON ATTRIBUTES TABLE : END BUTTON ATTRIBUTES

TABLE:SCROLLING TEXT1 ATTRIBUTES

DEPT.OF.CSE, DR. TTIT, KGF 16 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

TABLE: SCROLLING TEXT2 ATTRIBUTES TABLE : SCROLLING TEXT3 ATTRIBUTES

TABLE : SCROLLING TEXT4 ATTRIBUTES

DEPT.OF.CSE, DR. TTIT, KGF 17 2020-21


UNIT CONVERTER ANDROID APPLICATION DESIGN

3.3 DESIGN OF XML:

Fig: Design of XML

DEPT.OF.CSE, DR. TTIT, KGF 18 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

CHAPTER-4

CODING

4.1 ANDROID MAINFEST XML CODE

<?xml version="1.0" encoding="utf-8"?>


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pro">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Pro">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>

</manifest>

DEPT.OF.CSE, DR. TTIT, KGF 19 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

4.2 MAIN ACTIVITY XML CODE

<?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"
android:background="@color/black"
tools:context=".MainActivity">

<TextView
android:id="@+id/txtmarquee3"
android:layout_width="249dp"
android:layout_height="55dp"
android:layout_marginTop="24dp"
android:ellipsize="marquee"
android:fontFamily="@font/audiowide"
android:marqueeRepeatLimit="marquee_forever"
android:padding="10dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="S JATHISH MURALI (1GV18CS051)"
android:textDirection="ltr"
android:textSize="25sp"
android:textStyle="bold|italic"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.537"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtmarquee"
app:layout_constraintVertical_bias="0.088" />

DEPT.OF.CSE, DR. TTIT, KGF 20 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

<Button
android:id="@+id/buttonstart"
android:layout_width="286dp"
android:layout_height="49dp"
android:layout_marginTop="12dp"
android:background="#43A047"
android:fontFamily="@font/aclonica"
android:text="START TASK"
android:textSize="25sp"
android:textStyle="bold|italic"
app:backgroundTint="#43A047"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.512"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2"
app:layout_constraintVertical_bias="0.0" />

<Button
android:id="@+id/buttonstop"
android:layout_width="287dp"
android:layout_height="51dp"
android:layout_marginTop="8dp"
android:background="#D81B60"
android:fontFamily="@font/aclonica"
android:text="End Task "
android:textSize="25sp"
android:textStyle="bold|italic"
app:backgroundTint="#D81B60"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.508"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/buttonstart"

DEPT.OF.CSE, DR. TTIT, KGF 21 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

android:scrollHorizontally="true"
android:singleLine="true"
android:text="CHAITANYA M S (1GV18CS010)"
android:textDirection="ltr"
android:textSize="25sp"
android:textStyle="bold|italic"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.524"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtmarquee4"
app:layout_constraintVertical_bias="0.053" />

<TextView
android:id="@+id/txtmarquee4"
android:layout_width="175dp"
android:layout_height="57dp"
android:ellipsize="marquee"
android:fontFamily="@font/keania_one"
android:marqueeRepeatLimit="marquee_forever"
android:padding="10dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="PROJECT BY"
android:textDirection="rtl"
android:textSize="30sp"
android:textStyle="bold"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.523" />

DEPT.OF.CSE, DR. TTIT, KGF 22 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

<TextClock
android:id="@+id/textClock"
android:layout_width="122dp"
android:layout_height="66dp"
android:fontFamily="@font/geostar_fill"
android:format12Hour="hh:mm:ss A"
android:textColor="#636363"
android:textSize="20sp"
android:textStyle="bold|italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:ignore="MissingConstraints" />

<TextView
android:id="@+id/datetext"
android:layout_width="214dp"
android:layout_height="62dp"
android:text="TextView"
android:textAllCaps="true" android:textColor="#636363"
android:textSize="20sp" android:textStyle="bold|italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.025"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />

DEPT.OF.CSE, DR. TTIT, KGF 23 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

4.3 MAIN ACTIVITY JAVA CODE

package com.example.pro;

import androidx.appcompat.app.AppCompatActivity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class MainActivity extends AppCompatActivity {


TextView txtmarq,txtmarq2,txtmarq3,txtmarq4,date;
Button btnstart, btnstop;
String dateTime;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
txtmarq = findViewById(R.id.txtmarquee);
txtmarq2 = findViewById(R.id.txtmarquee2);
txtmarq3 = findViewById(R.id.txtmarquee3);
txtmarq4 = findViewById(R.id.txtmarquee4);
btnstart = findViewById(R.id.buttonstart);
date = findViewById(R.id.datetext);
Calendar calendar = Calendar.getInstance();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("E,
dd-MMM-yyyy ");
dateTime = simpleDateFormat.format(calendar.getTime());
date.setText(dateTime);

DEPT.OF.CSE, DR. TTIT, KGF 24 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

btnstart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ExampleAsyncTask task = new ExampleAsyncTask();
task.execute();
}
});

btnstop = findViewById(R.id.buttonstop);
btnstop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
txtmarq.setSelected(true);
txtmarq.setVisibility(View.INVISIBLE);
txtmarq2.setSelected(true);
txtmarq2.setVisibility(View.INVISIBLE);
txtmarq3.setSelected(true);
txtmarq3.setVisibility(View.INVISIBLE);
txtmarq4.setSelected(true);
txtmarq4.setVisibility(View.INVISIBLE);
}
});
}

private class ExampleAsyncTask extends AsyncTask<String, String,


String> {
@Override
protected void onPreExecute()
{
super.onPreExecute();
Toast.makeText(getBaseContext(), "~Asynchronous Task Started~",
Toast.LENGTH_SHORT).show();
}
@Override

DEPT.OF.CSE, DR. TTIT, KGF 25 2020-21


UNIT CONVERTER ANDROID APPLICATION CODING

protected String doInBackground(String... strings)


{
try
{
Thread.sleep(250);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
return null;
}

@Override
protected void onPostExecute(String s)
{
super.onPostExecute(s);
txtmarq.setVisibility(View.VISIBLE);
txtmarq.setSelected(true);
txtmarq2.setVisibility(View.VISIBLE);
txtmarq2.setSelected(true);
txtmarq3.setVisibility(View.VISIBLE);
txtmarq3.setSelected(true);
txtmarq4.setVisibility(View.VISIBLE);
txtmarq4.setSelected(true);
}
}
}

DEPT.OF.CSE, DR. TTIT, KGF 26 2020-21


UNIT CONVERTER ANDROID APPLICATION SNAPSHOTS

CHAPTER 5
SNAPSHOTS:

DEPT.OF.CSE, DR. TTIT, KGF 27 2020-21


UNIT CONVERTER ANDROID APPLICATION SNAPSHOTS

DEPT.OF.CSE, DR. TTIT, KGF 28 2020-21


UNIT CONVERTER ANDROID APPLICATION SNAPSHOTS

DEPT.OF.CSE, DR. TTIT, KGF 29 2020-21


UNIT CONVERTER ANDROID APPLICATION SNAPSHOTS

DEPT.OF.CSE, DR. TTIT, KGF 30 2020-21


UNIT CONVERTER ANDROID APPLICATION SNAPSHOTS

DEPT.OF.CSE, DR. TTIT, KGF 31 2020-21


UNIT CONVERTER ANDROID APPLICATION CONCLUSION

CHAPTER 6

CONCLUSION

The project unit converter in Android was completed successfully. The system has been
developed with much care and free of errors and the same time it is efficient and less time
consuming. The purpose of this project was to develop android application to run Android API
for Asynchronous tasks. This project helped me in graining valuable information and practical
knowledge on several topics like designing android application using xml, JavaScript. The entire
system is secured also the project and software development life cycle. I learnt to test different
features of a project.

The project has given great satisfaction in having designed an application which can be
implemented to various kinds of products by simple modification. This is scope of future
development in our project to a great extent several features can be added in the system in future
providing.

DEPT OF CSE, DR. TTIT, KGF 32 2020-21


UNIT CONVERTER ANDROID APPLICATION BIBILOGRAPHY

BIBILOGRAPHY
TEXTBOOKS:

 Google Developer Training, "Android Developer Fundamentals


Course – Concept Reference”, Google Developer Training Team,
2017.

 Erik Hellman, “Android Programming – Pushing the Limits”, 1 st


Edition, Wiley India Pvt Ltd, 2014.

 Dawn Griffiths and David Griffiths, “Head First Android


Development”, 1st Edition, O’Reilly SPD Publishers, 2015.

 Bill Phillips, Chris Stewart and Kristin Marsicano, “Android


Programming: The Big Nerd Ranch Guide”, 3rd Edition, Big Nerd
Ranch Guides, 2017.

WEBSITES:

 www.google.co.in
 www.w3school.com
 www.geeksforgeeks.org
 www.developer.android.com
 www.tutorialspoint.com

DEPT OF CSE, DR. TTIT, KGF 33 2020-21

You might also like