SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais 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
 

Mais 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
 

Último

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

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