Professional Documents
Culture Documents
on
Bachelor of Technology
by
Sapna Jayram Shelar
PRN no: 2030331246012
under the guidance of
Prof. Pranita Jadhav
1
2
Contents
1 Introduction 1
1.1 What is Android? . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Need of Android? . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Features of Android . . . . . . . . . . . . . . . . . . . . . . 7
3 Android Architecture 18
6 Conclusion 46
7 Reference 47
3
List of Figures
1.1 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Characteristics of Android . . . . . . . . . . . . . . . . . . 6
1.3 Features of Android . . . . . . . . . . . . . . . . . . . . . . 9
4.1 View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 View Group . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3 Frame Layout . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.4 Linear Layout . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.5 Relative Layout . . . . . . . . . . . . . . . . . . . . . . . . 28
4
5.2 TextView . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3 EditText . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.4 Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.5 ImageButton . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.6 ToggleButton . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.7 RadioButton . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.8 CheckBox . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5
Chapter 1
Introduction
1
such as Google Chrome, the digital distribution platform Google Play,
and the associated Google Play Services development platform. As the
world’s most popular mobile platform, Android powers hundreds of mil-
lions of mobile devices in more than 190 countries around the world. It
has the largest installed base of any mobile platform and is still growing
fast. Every day another million users power up their Android-powered de-
vices for the first time and start looking for apps, games, and other digital
content.
2
Figure 1.1: Android
3
software licenses. Google publishes most of the code under the Apache
License version 2.0 and the rest, Linux kernel changes, under the GNU
General Public License version 2. Android is an operating system and
programming platform developed by Google for mobile phones and other
mobile devices, such as tablets. It can run on many different devices from
many different manufacturers. Android includes a software development
kit (SDK) that helps you write original code and assemble software mod-
ules to create apps for Android users. Android also provides a marketplace
to distribute apps. All together, Android represents an ecosystem for mo-
bile apps.
1. Desktop: The Android phone adds widgets to the desktop the pur-
pose of for the Widget for example the Facebook allow us to update
our Facebook desktop the people with gets allow us to make possi-
ble different actions for a different contacts right from our desktop
the message will get allow us to immediately see our email from the
desktop.
4
and so on.These button let us a switch on off instantly which will
help us to conserve battery life.
5
Figure 1.2: Characteristics of Android
6
1.3 Features of Android
There are numerous features of android. Some of them are listed below:
7
6. Multi-tasking: Multitasking of applications, with unique handling of
memory allocation, is available, using this users can jump from one
task to another and at the same time various applications can run
simultaneously.
9. Wi-Fi: A technology that lets apps discover and pair directly, over a
high-bandwidth peer-to-peer connection.
8
Figure 1.3: Features of Android
9
Chapter 2
It is mandatory to download the Java JDK. There are only seven steps for
the installation process of Java JDK which are as follows:
2. By clicking on the link given above you will be directed to the ORA-
CLE page, there will be some links as depicted in the above picture.
4. Then, download the link as per your operating system that is Win-
dows, Mac, Linux.
10
Figure 2.1: Installation of JAVA JDK
5. After downloading the file, click on the downloaded file and install
JDK.
11
2.2 Installation Steps of Android Studio for Win-
dows
There are just three steps for installing Android studio for windows which
are as follows:
1. Firstly, to download Android Studio This will direct you to the official
website of Android Studio.
3. Lastly, click on the downloaded file and packages will install, auto-
matically. We are done with installation for windows and now you
can start making your application using Android Studio.
OR
Clicking Next took me to the following dialog box, which gives you
the option to decline installing the Android SDK (included with the
installer) and an Android Virtual Device (AVD).
I chose to keep the default settings. After clicking Next, you’ll be
taken to the license agreement dialog box. Accept the license to
continue the installation.
The next dialog box invites you to change the installation locations
for Android Studio and the Android SDK.
Change the location or accept the default locations and click Next.
The installer defaults to creating a shortcut for launching this pro-
gram, or you can choose to decline. I recommend that you create the
12
Figure 2.2: Set the Android Studio and Android SDK installation locations
13
Figure 2.3: Create a New Shortcut for Android Studio
14
Figure 2.4: Leave the Start Android Studio check box checked to run this software
15
shortcut, then click the Install button to begin installation.
The resulting dialog box shows the progress of installing Android
Studio and the Android SDK. Clicking the Show Details button will
let you view detailed information about the installation progress.
The dialog box will inform you when installation has finished.
To complete your installation, leave the Start Android Studio box
checked and click Finish.
Following are the steps for installing Android studio for Mac:
2. After that, click on the button and dmg file will download.
4. Then, drag and drop the Android Studio icon in the application
folder. This will copy all the files of Android Studio in the appli-
cations folder and you will be able to see the Android Studio icon in
the application.
Just follow these three steps to download Android Studio for Linux:
16
1. Download Android Studio file.
3. Now to run Android Studio, open terminal and then open bin direc-
tory and execute the studio.sh command on the terminal.
4. And then you can build your Android applications on your Linux
system as well.
17
Chapter 3
Android Architecture
18
Figure 3.1: Android Architecture
19
rendering API.
20
of the Dalvik virtual machine. The Android runtime also provides a set
of core libraries which enable Android application developers to write An-
droid applications using standard Java programming language.
Application Framework:- The Application Framework layer provides
many higher-level services to applications in the form of Java classes. Ap-
plication developers are allowed to make use of these services in their
applications.
The Android framework includes the following key services
Applications:- You will find all the Android application at the top layer.
You will write your application to be installed on this layer only. Examples
of such applications are Contacts Books, Browser, Games etc.
21
Chapter 4
Android Layout is used to define the user interface that holds the UI con-
trols or widgets that will appear on the screen of an android application
or activity screen. Generally, every application is a combination of View
and ViewGroup. As we know, an android application contains a large
number of activities and we can say each activity is one page of the ap-
plication. So, each activity contains multiple user interface components
and those components are the instances of the View and ViewGroup. All
the elements in a layout are built using a hierarchy of View and View-
Group objects. View:- A View is defined as the user interface which is
used to create interactive UI components such as TextView, ImageView,
EditText, RadioButton, etc., and is responsible for event handling and
drawing. They are Generally Called Widgets.
A ViewGroup act as a base class for layouts and layouts parameters
that hold other Views or ViewGroups and to define the layout properties.
They are Generally Called layouts.
The Android framework will allow us to use UI elements or widgets in
22
Figure 4.1: View
23
Figure 4.2: View Group
two ways:
1. Use UI elements in the XML file
24
3. Android Constraint Layout: ConstraintLayout is a ViewGroup sub-
class, used to specify the position of layout constraints for every child
View relative to other views present. A ConstraintLayout is similar
to a RelativeLayout, but having more power.
Layout Managers (or simply layouts) are said to be extensions of the View-
Group class. They are used to set the position of child Views within the UI
we are building. We can nest the layouts, and therefore we can create ar-
bitrarily complex UIs using a c GridLayout- It was introduced in Android
4.0 (API level 14), the Grid Layout used a rectangular grid of infinitely
thin lines to lay out Views in a series of rows and columns. The Grid
Layout is incredibly flexible and can be used to greatly simplify layouts
25
and reduce or eliminate the complex nesting often required to construct
UIs using the layouts described before.ombination of layouts.
There is a number of layout classes in the Android SDK. They can be
used, modified or can create your own to make the UI for your Views,
Fragments and Activities. You can display your contents effectively by
using the right combination of layouts.
The most commonly used layout classes that are found in Android SDK
are:
26
Figure 4.3: Frame Layout
27
Figure 4.4: Linear Layout
28
Chapter 5
view class represent the basic building block for user interface components.
A view occupies a rectangular Area on the screen and is responsible for
drawing and event handling. View is the base class for widgets, which
are used to create interactive UI components like buttons, text fields, etc.
The ViewGroup is a subclass of View and provides invisible container that
hold other Views or other ViewGroups and define their layout properties.
A veiw group is a special view that can contain other views. The view
group is the best class for layouts and view containers. The view is the
component with Android providers to design the layouts of the app. A
view is a superclass for all the UI components. The View class serves as
the base for subclasses called ”widgets,” which offer fully implemented UI
objects, like text fields and buttons. The ViewGroup class serves as the
base for subclasses called ”layouts,” which offer different kinds of layout
architecture, like linear, tabular and relative. A View object is a data
structure whose properties store the layout parameters and content for a
specific rectangular area of the screen. A View object handles its own
29
Figure 5.1: inheritance hierarchy of Designing user interface with view
30
Attributes/Properties of TextView:
• text: text attribute is used to set the text in a text view. We can set
the text in xml as well as in the java class. Below is the example code
with explanation included in which we set the text AbhiAndroid in a
text view.
• textSize: textSize attribute is used to set the size of text of a text view.
We can set the text size in sp(scale independent pixel) or dp(density
pixel).
• padding: padding attribute is used to set the padding from left, right,
top or bottom. In above example code of background we also set the
10dp padding from all the side’s of text view.
31
Figure 5.2: TextView
32
• EditText: A EditText is an overlay over TextView that configures
itself to be editable. It is the predefined subclass of TextView that
includes rich editing capabilities. Edittext refers to the widget that
displays an empty textfield in which a user can enter the required
text and this text is further used inside our application.
Attributes/Properties of EditText:
• gravity: Used to specify how to align the text like left, right, center,
top, etc.
• textStyle: Used to set style of the text. For example, bold, italic,
bolditalic, etc. Text styles define three sizes for the formatted text -
’full’, ’short’ and ’narrow’
33
• height: It makes the TextView be exactly this many pixels tall.
• clickable: Used to set true when you want to make this View clickable.
Otherwise, set false.
• padding: The padding attribute is used to set the padding from left,
right,top or bottom. In above example code of background we also
set the 10dp padding from all the slides of bottom.
34
Figure 5.3: EditText
35
• Button: A button consists of text or an icon (or both text and an icon)
that communicates what action occurs when the user touches it. An-
droid 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.
Attributes/Properties of Button:
• textStyle: Used to the display style of the text like Bold, Italic, etc.
• padding: Used to set the padding of the view. the padding attribute
is used to set the padding from left, right, top or bottom. In above
example code of background we also set the 10dp padding from all
the slides of bottom.
• gravity: Used to specify the gravity of the view like center, top, bot-
tom, etc
36
Figure 5.4: Button
Attributes/Properties of ImageButton:
• src: src is an attribute used to set a source file of image or you can
37
say image in your image button to make your layout look attractive.
• padding: padding attribute is used to set the padding from left, right,
top or bottom of the ImageButton.
– paddingRight : set the padding from the right side of the image
button.
– paddingLeft : set the padding from the left side of the image
button.
– paddingTop : set the padding from the top side of the image
button.
– paddingBottom : set the padding from the bottom side of the
image button.
– padding : set the padding from the all side’s of the image button.
38
Figure 5.5: ImageButton
39
• ToggleButton: A toggle button allows the user to change a setting
between two states. You can add a basic toggle button to your layout
with the ToggleButton object. Android 4.0 (API level 14) introduces
another kind of toggle button called a switch that provides a slider
control, which you can add with a Switch object.
Attributes/Properties of ToggleButton:
• textOff: This is the text for the button when it is not checked.
40
Figure 5.6: ToggleButton
• RadioButton: Radio buttons allow the user to select one option from
a set. You should use radio buttons for optional sets that are mu-
tually exclusive if you think that the user needs to see all available
options side-by-side. If it’s not necessary to show all options side-by-
side, use a spinner instead.To create each radio button option, create
a RadioButton in your layout. However, because radio buttons are
mutually exclusive, you must group them together inside a Radio-
Group. By grouping them together, the system ensures that only one
radio button can be selected at a time.
Beginning with Android RadioButton, A RadioButton is a button
that has two states, that are either check or uncheck. This means if
we click on a RadioButton it gets into Checked state and by default,
it comes in Unchecked State.
41
In the Android Radio button, one thing to be noted is, once it gets
into the checked state we cannot undo it. Generally, we use them
in our application to let the users select one option from a set of
options. Radio Button is one of the important Android UI controls,
as it provides an interactive User Interface for the users.
Attributes/Properties of RadioButton:
• textStyle: It sets the style of the text, like – bold, italics. Text styles
define three sizes for the formatted text - ’full’, ’short’ and ’narrow’
• padding: It sets the padding from left, right bottom or the top. In
above example code of background we also set the 10dp padding from
all the slides of bottom.
42
Figure 5.7: RadioButton
43
• CheckBox: CheckBox is also a two-state button, it can have either
checked state or unchecked state. The major difference between An-
droid CheckBox and Android RadioButton is that checkboxes can be
unchecked manually. Android CheckBox is mostly useful when there
are multiple options the users are allowed to choose all the options
that are applicable.
Attributes/Properties of RadioButton:
• padding: It sets the padding from left, right bottom or the top.
44
Figure 5.8: CheckBox
45
Chapter 6
Conclusion
46
Chapter 7
Reference
47