SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
HELLO
WE MEET AGAIN 
Android System
Architecture
Android is built on top of Linux kernel.
Android is built on top of Linux kernel.
Android uses a number of libraries to perform various functionalities.
Android is built on top of Linux kernel.
Android uses a number of libraries to perform various functionalities.
Just like the Java Virtual Machine in our computers, Android has its
own Dalvik Virtual Machine optimized for itself.
Android is built on top of Linux kernel.
Android uses a number of libraries to perform various functionalities.
Just like the Java Virtual Machine in our computers, Android has its
own Dalvik Virtual Machine optimized for itself.
Higher-level services to applications in the form of Java classes:
Application Framework.
Android is built on top of Linux kernel.
Android uses a number of libraries to perform various functionalities.
Just like the Java Virtual Machine in our computers, Android has its
own Dalvik Virtual Machine optimized for itself.
Higher-level services to applications in the form of Java classes:
Application Framework.
We will write applications to be installed on the Application layer only.
Introduction to

xml	
  
Android’s defined tags

Introduction to

xml	
  

Used to define some of
the resources
-  Layouts
-  Strings
Used in Android
Manifest
Preferred way for
defining UI elements
-  Separation of
code
Simple UI
LO
AU
YT

Eclipse has a great UI creator
-  Generates all the xml for you
Composed of View objects

Can be specified for portrait or
landscape
-  Different designs for different
orientation.
VIEWS
A layout/activity is composed of
Views and ViewGroups.
View is something that is visible.
Examples:
- 
- 
- 
- 

TextViews,
Buttons,
TimePicker,
DatePicker
VIEWS
3 ways to declare width and height

a. 
b. 
c. 

fill_parent
wrap_content
match_parent

<Button
android:id = “@+id/button”
android:layout_width = “fill_parent”
android:layout_height = “wrap_content”
android:text = “Button”/>

{

DO NOT FORGET

TO DEFINE US
VIEWS

{

<EditText
android:id = “@+id/number”
android:layout_width = “fill_parent”
android:layout_height = “wrap_content”
android:text = “number”/>

You can change
the type of
inputs as
necessary
VIEWS

<TextView
android:id = “@+id/result”
android:layout_height = “wrap_parent”
android:layout_weight = “fill_content”
android:text = “invisible”/>

3 ways to declare visibility

a. 
b. 
c. 

visible
invisible
gone
FrameLayout

4

One or more View can be
grouped into a ViewGroup

RelativeLayout

3

This is the <body> to your
view.

LinearLayout

2

ViewGroups

1

TableLayout

5

ScrollView, etc.
Each layout has something
unique to it.
Each layout has a purpose!
LinearLayout
Declaring the XML namespace (done
in the 1st ViewGroup)

<LinearLayout
xmlns:android=“http://schemas.android.com/apk/res/
android”
android:layout_width= “match_parent”
android:layout_height= “match_parent”
android:orientation= “vertical”>
… (TextViews, Buttons etc.)
</LinearLayout>
Unique for this ViewGroup
a.  Vertical
b.  Horizontal
RelativeLayout

Does not have any android:orientation.

Affects the layouts inside it

Views are arranged according to references.
RelativeLayout

<RelativeLayout ..>
<Button android:id= “@+id/btn”
android:layout_alignParentTop= "true" … />
<TextView android:layout_below = “@id/btn” … />
<TextView android:layout_toRightOf = “@id/btn” …/>
<TextView android:layout_toLeftOf = “@id/btn” …/>
<TextView android:layout_alignParentBottom =
“true” .../>
</RelativeLayout>
Various other positioning
techniques also there:
alignLeft
alignBaseLine
above, etc.
LinearLayout

vs

RelativeLayout
LETS UNITE!
<LinearLayout … >
<RelativeLayout … >
…
</RelativeLayout>
</LinearLayout>
You can use ViewGroup within ViewGroup

LAYOUTCEPTION!
INTENTS
ENTS

<a href= “target”>page 2</a>

Intent ~ Redirecting !

Intent is used to call into android's drivers,
other applications as well.

Powerful inter/intra application messagepassing framework.

While working with intents we also have to
work with the

Android Manifest
Android Manifest
Presents essential information
about the application to the
Android system
Information the system must have before it
can run any of the application's code.
Remember this?
Manifest
Name of the Java package for the
application.

It describes the components of
the application
the activities, services, broadcast receivers, and
content providers.
Manifest
It declares which permissions the
application must have in order to
access protected parts of the API and
interact with other applications.

It declares the minimum level of the
Android API that the application
requires … and much more.
MODIFICATION IN ANDROID MANIFEST

Declares an activity (an Activity
subclass) that implements part of the
application’s visual user interface.

<activity android:name=".OtherClass">
<intent-filter>
<action android:name="android.intent.action.NAME"/>
<category
android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
The types of intents that an app can
respond to

Adds an action to an intent filter

Adds a category name to an intent
filter
In MainActivity
Intent i = new Intent(MainActivity.this,
OtherClass.class); // Instantiating the intent
class
i.putExtra(“name”, value); // values to be sent
startActivity(i); // Starting the intent

In OtherClass
Intent i = getIntent(); //getting the intent
object
String name = i.getStringExtra(“name”); //
getting value from passed intent

Intents
HAVE YOU EVER WONDERED
WHAT HAPPENS WHEN YOU
PRESS THE BACK BUTTON/
HOME BUTTON ON ANDROID?
Activity
Life
Cycle
Activity
Life
Cycle

onCreate() :
instantiate views, setup
references, implement
listeners.

onPause() :
save data/state in the
application.

onResume() :
can be used to load the
saved state, is always
called when the application
comes into view.
THAT’S ALL FOLKS!
WE’LL SEE YOU TOMORROW

Contenu connexe

Tendances

Android Training (Android UI)
Android Training (Android UI)Android Training (Android UI)
Android Training (Android UI)Khaled Anaqwa
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & LayoutsVijay Rastogi
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJSBrajesh Yadav
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular jsAayush Shrestha
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesMohammad Shaker
 
iOS Layout Overview
iOS Layout OverviewiOS Layout Overview
iOS Layout OverviewMake School
 
AngularJS - Services
AngularJS - ServicesAngularJS - Services
AngularJS - ServicesNir Kaufman
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseEPAM Systems
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation Phan Tuan
 
Design for succcess with react and storybook.js
Design for succcess with react and storybook.jsDesign for succcess with react and storybook.js
Design for succcess with react and storybook.jsChris Saylor
 
Violet Peña - Storybook: A React Tool For Your Whole Team
Violet Peña - Storybook: A React Tool For Your Whole TeamViolet Peña - Storybook: A React Tool For Your Whole Team
Violet Peña - Storybook: A React Tool For Your Whole TeamAnton Caceres
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by steppriya Nithya
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend DevelopersSergio Nakamura
 
06. Android Basic Widget and Container
06. Android Basic Widget and Container06. Android Basic Widget and Container
06. Android Basic Widget and ContainerOum Saokosal
 

Tendances (20)

Android xml-based layouts-chapter5
Android xml-based layouts-chapter5Android xml-based layouts-chapter5
Android xml-based layouts-chapter5
 
Android Training (Android UI)
Android Training (Android UI)Android Training (Android UI)
Android Training (Android UI)
 
Angular js
Angular jsAngular js
Angular js
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJS
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and Utilities
 
iOS Layout Overview
iOS Layout OverviewiOS Layout Overview
iOS Layout Overview
 
AngularJS - Services
AngularJS - ServicesAngularJS - Services
AngularJS - Services
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
 
Solid angular
Solid angularSolid angular
Solid angular
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation
 
Design for succcess with react and storybook.js
Design for succcess with react and storybook.jsDesign for succcess with react and storybook.js
Design for succcess with react and storybook.js
 
Android Ui
Android UiAndroid Ui
Android Ui
 
Basic Android Layout
Basic Android LayoutBasic Android Layout
Basic Android Layout
 
Violet Peña - Storybook: A React Tool For Your Whole Team
Violet Peña - Storybook: A React Tool For Your Whole TeamViolet Peña - Storybook: A React Tool For Your Whole Team
Violet Peña - Storybook: A React Tool For Your Whole Team
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by step
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
 
06. Android Basic Widget and Container
06. Android Basic Widget and Container06. Android Basic Widget and Container
06. Android Basic Widget and Container
 
List Views
List ViewsList Views
List Views
 

Similaire à Training Session 2 - Day 2

Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Android Tutorial
Android TutorialAndroid Tutorial
Android TutorialFun2Do Labs
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidDenis Minja
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
Android Development : (Android Studio, PHP, XML, MySQL)
Android Development : (Android Studio, PHP, XML, MySQL)Android Development : (Android Studio, PHP, XML, MySQL)
Android Development : (Android Studio, PHP, XML, MySQL)Kavya Barnadhya Hazarika
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101Michael Angelo Rivera
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...Ted Chien
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介easychen
 
Android training day 2
Android training day 2Android training day 2
Android training day 2Vivek Bhusal
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in androidMahmudul Hasan
 
Synapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldSynapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldTarunsingh198
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfAbdullahMunir32
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentMonir Zzaman
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectJoemarie Amparo
 
Android Starting App Development
Android  Starting App DevelopmentAndroid  Starting App Development
Android Starting App DevelopmentParamvir Singh
 

Similaire à Training Session 2 - Day 2 (20)

Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Android Development : (Android Studio, PHP, XML, MySQL)
Android Development : (Android Studio, PHP, XML, MySQL)Android Development : (Android Studio, PHP, XML, MySQL)
Android Development : (Android Studio, PHP, XML, MySQL)
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介
 
Android training day 2
Android training day 2Android training day 2
Android training day 2
 
Android Development Basics
Android Development BasicsAndroid Development Basics
Android Development Basics
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
 
Synapseindia android apps introduction hello world
Synapseindia android apps introduction hello worldSynapseindia android apps introduction hello world
Synapseindia android apps introduction hello world
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Android Starting App Development
Android  Starting App DevelopmentAndroid  Starting App Development
Android Starting App Development
 
Android Basic- CMC
Android Basic- CMCAndroid Basic- CMC
Android Basic- CMC
 

Plus de Vivek Bhusal

Android training day 5
Android training day 5Android training day 5
Android training day 5Vivek Bhusal
 
Android training day 4
Android training day 4Android training day 4
Android training day 4Vivek Bhusal
 
Android training day 3
Android training day 3Android training day 3
Android training day 3Vivek Bhusal
 
Android training day 1
Android training day 1Android training day 1
Android training day 1Vivek Bhusal
 
Stores munk presentation_aug10 (1)
Stores munk presentation_aug10 (1)Stores munk presentation_aug10 (1)
Stores munk presentation_aug10 (1)Vivek Bhusal
 
Wisevote - opendataweek @
Wisevote - opendataweek @Wisevote - opendataweek @
Wisevote - opendataweek @Vivek Bhusal
 
Android training at GDG kathmandu Startup weekend bootcamp
Android training at GDG kathmandu Startup weekend bootcampAndroid training at GDG kathmandu Startup weekend bootcamp
Android training at GDG kathmandu Startup weekend bootcampVivek Bhusal
 

Plus de Vivek Bhusal (11)

Day 6
Day 6Day 6
Day 6
 
Day 5
Day 5Day 5
Day 5
 
Android training day 5
Android training day 5Android training day 5
Android training day 5
 
Android training day 4
Android training day 4Android training day 4
Android training day 4
 
Android training day 3
Android training day 3Android training day 3
Android training day 3
 
Android training day 1
Android training day 1Android training day 1
Android training day 1
 
Stores munk presentation_aug10 (1)
Stores munk presentation_aug10 (1)Stores munk presentation_aug10 (1)
Stores munk presentation_aug10 (1)
 
Mybudget
MybudgetMybudget
Mybudget
 
Wisevote - opendataweek @
Wisevote - opendataweek @Wisevote - opendataweek @
Wisevote - opendataweek @
 
Android training at GDG kathmandu Startup weekend bootcamp
Android training at GDG kathmandu Startup weekend bootcampAndroid training at GDG kathmandu Startup weekend bootcamp
Android training at GDG kathmandu Startup weekend bootcamp
 
My medical info
My medical infoMy medical info
My medical info
 

Dernier

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Dernier (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

Training Session 2 - Day 2

  • 3.
  • 4. Android is built on top of Linux kernel.
  • 5. Android is built on top of Linux kernel. Android uses a number of libraries to perform various functionalities.
  • 6. Android is built on top of Linux kernel. Android uses a number of libraries to perform various functionalities. Just like the Java Virtual Machine in our computers, Android has its own Dalvik Virtual Machine optimized for itself.
  • 7. Android is built on top of Linux kernel. Android uses a number of libraries to perform various functionalities. Just like the Java Virtual Machine in our computers, Android has its own Dalvik Virtual Machine optimized for itself. Higher-level services to applications in the form of Java classes: Application Framework.
  • 8. Android is built on top of Linux kernel. Android uses a number of libraries to perform various functionalities. Just like the Java Virtual Machine in our computers, Android has its own Dalvik Virtual Machine optimized for itself. Higher-level services to applications in the form of Java classes: Application Framework. We will write applications to be installed on the Application layer only.
  • 10. Android’s defined tags Introduction to xml   Used to define some of the resources -  Layouts -  Strings Used in Android Manifest Preferred way for defining UI elements -  Separation of code
  • 12. LO AU YT Eclipse has a great UI creator -  Generates all the xml for you Composed of View objects Can be specified for portrait or landscape -  Different designs for different orientation.
  • 13. VIEWS A layout/activity is composed of Views and ViewGroups. View is something that is visible. Examples: -  -  -  -  TextViews, Buttons, TimePicker, DatePicker
  • 14. VIEWS 3 ways to declare width and height a.  b.  c.  fill_parent wrap_content match_parent <Button android:id = “@+id/button” android:layout_width = “fill_parent” android:layout_height = “wrap_content” android:text = “Button”/> { DO NOT FORGET TO DEFINE US
  • 15. VIEWS { <EditText android:id = “@+id/number” android:layout_width = “fill_parent” android:layout_height = “wrap_content” android:text = “number”/> You can change the type of inputs as necessary
  • 16. VIEWS <TextView android:id = “@+id/result” android:layout_height = “wrap_parent” android:layout_weight = “fill_content” android:text = “invisible”/> 3 ways to declare visibility a.  b.  c.  visible invisible gone
  • 17. FrameLayout 4 One or more View can be grouped into a ViewGroup RelativeLayout 3 This is the <body> to your view. LinearLayout 2 ViewGroups 1 TableLayout 5 ScrollView, etc.
  • 18. Each layout has something unique to it. Each layout has a purpose!
  • 19. LinearLayout Declaring the XML namespace (done in the 1st ViewGroup) <LinearLayout xmlns:android=“http://schemas.android.com/apk/res/ android” android:layout_width= “match_parent” android:layout_height= “match_parent” android:orientation= “vertical”> … (TextViews, Buttons etc.) </LinearLayout> Unique for this ViewGroup a.  Vertical b.  Horizontal
  • 20. RelativeLayout Does not have any android:orientation. Affects the layouts inside it Views are arranged according to references.
  • 21. RelativeLayout <RelativeLayout ..> <Button android:id= “@+id/btn” android:layout_alignParentTop= "true" … /> <TextView android:layout_below = “@id/btn” … /> <TextView android:layout_toRightOf = “@id/btn” …/> <TextView android:layout_toLeftOf = “@id/btn” …/> <TextView android:layout_alignParentBottom = “true” .../> </RelativeLayout> Various other positioning techniques also there: alignLeft alignBaseLine above, etc.
  • 23. LETS UNITE! <LinearLayout … > <RelativeLayout … > … </RelativeLayout> </LinearLayout>
  • 24. You can use ViewGroup within ViewGroup LAYOUTCEPTION!
  • 26. ENTS <a href= “target”>page 2</a> Intent ~ Redirecting ! Intent is used to call into android's drivers, other applications as well. Powerful inter/intra application messagepassing framework. While working with intents we also have to work with the Android Manifest
  • 27. Android Manifest Presents essential information about the application to the Android system Information the system must have before it can run any of the application's code.
  • 29. Manifest Name of the Java package for the application. It describes the components of the application the activities, services, broadcast receivers, and content providers.
  • 30. Manifest It declares which permissions the application must have in order to access protected parts of the API and interact with other applications. It declares the minimum level of the Android API that the application requires … and much more.
  • 31. MODIFICATION IN ANDROID MANIFEST Declares an activity (an Activity subclass) that implements part of the application’s visual user interface. <activity android:name=".OtherClass"> <intent-filter> <action android:name="android.intent.action.NAME"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> The types of intents that an app can respond to Adds an action to an intent filter Adds a category name to an intent filter
  • 32. In MainActivity Intent i = new Intent(MainActivity.this, OtherClass.class); // Instantiating the intent class i.putExtra(“name”, value); // values to be sent startActivity(i); // Starting the intent In OtherClass Intent i = getIntent(); //getting the intent object String name = i.getStringExtra(“name”); // getting value from passed intent Intents
  • 33. HAVE YOU EVER WONDERED WHAT HAPPENS WHEN YOU PRESS THE BACK BUTTON/ HOME BUTTON ON ANDROID?
  • 35. Activity Life Cycle onCreate() : instantiate views, setup references, implement listeners. onPause() : save data/state in the application. onResume() : can be used to load the saved state, is always called when the application comes into view.
  • 36. THAT’S ALL FOLKS! WE’LL SEE YOU TOMORROW