SlideShare a Scribd company logo
1 of 45
How to Android
Lesson one
By Callum Taylor
with help from Tim Mathews and Matt Allen
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Disclaimer
• I'm not a well experienced speaker
• I will probably talk quite fast, If so let me know and I'll slow
down
• Everything Is based off personal experiences and
practices
• Take everything I say with a (large) pinch of salt
• Correct me If I'm wrong
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Introduction
• All slides can be found over at
slideshare.net/3sidedcube/android-course-lesson1-45184228
• Twitter/Github
@scruffyfox / @3sidedcube
• All code for this lesson can be found over at
github.com/3sidedcube/Android-BBCNews/tree/Lesson-1
Who we are
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Who we are
Our apps
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Our apps
Why we are doing this?
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Why are we doing this?
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
We're looking for interns
• Drive & passion (literally coding is your life)
• Examples of work
• Existing experience with development (preferably
java/android)
• Willing to work with me
• Full details on wall.3sidedcube.com
Why make an app?
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Why make an app?
What we're going to do
Whether you like it or not
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
BBC News
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
What's in the app
List views (recycler views) Images
API Integration
Models
Serialisation
Fragments
View pagers
Ways to develop
And why they are all bad
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Web technologies
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Why are they bad?
• Slow
• Expensive in memory and processing
• Not a native feel
• Extra layer of abstraction
• Its REALLY Slow
The proper way
And how to be a rockstar like me
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Native (JDK) development
• Java language
• JVM runtime (Dalvik, now superseded by ART)
• XML resources (layouts, strings, drawables)
• NDK (C++)
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Why native
• Literally designed for it
• Optimised heavily
• Its just better all round (access to APIs)
OOP
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Object Orientated Programming
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Parts of our car
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Example code
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Example initialisation
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Extending
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Extending
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Extending
Doesn't exist under the Automobile scope
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Methods
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Methods
Android FUN-damentals
Super fun times
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android framework
source files
drawables, values, layouts
R.java
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Typical structure
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Multiple drawable folders?
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android FUN-damentals
• An Android app is made up of Contexts, mainly Activities,
Fragments, and layout resources.
• Layouts are made up of Views.
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android FUN-damentals
• An Activity is a source file with a context which is
responsible for displaying and interacting with the UI and
UX of an app
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android FUN-damentals
• A Fragment is also a source file with a context which is
responsible for displaying and interacting with the UI and
UX of an app. Usually Fragments are used for smaller
chunks of UI. Fragments live within an Activity which
means their context is the same as the host's.
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android FUN-damentals
• A Context is something that has reference to the main UI
thread of an app and anything to do with displaying
content or interaction.
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Activities
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android FUN-damentals
• A View is something that is visible to the user and/or
displayed on the screen which serves a UI/UX purpose.
View • TextView • ImageView • Button • EditText • RecyclerView • CheckBox • RadioButton •
Spinner • VideoView • WebView • ProgressBar • ImageButton • and many many more
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Views
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Android FUN-damentals
• A Layout is an extension of View which can contain one
or more children views and arrange them in a specific
way (sometimes)
ViewGroup • FrameLayout • RelativeLayout • LinearLayout • ScrollView • CardView • and not
that many more
Lesson 1- slideshare.net/3sidedcube/android-course-lesson1
Layouts
Demo time

More Related Content

Viewers also liked

Enterprise architecture
Enterprise architectureEnterprise architecture
Enterprise architecturenurmeen1
 
Architecture pitfalls in android development
Architecture pitfalls in android developmentArchitecture pitfalls in android development
Architecture pitfalls in android developmentThomas Krueger
 
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architectureAndroid Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architectureNicheTech Com. Solutions Pvt. Ltd.
 
Android course Lesson2
Android course Lesson2Android course Lesson2
Android course Lesson23sidedcube
 
Android training course
Android training courseAndroid training course
Android training courseAdarsh Pandey
 
Indoctrination Ale y Beto
Indoctrination Ale y BetoIndoctrination Ale y Beto
Indoctrination Ale y BetoAle Gallegos
 
43 Social Media Posts for Movers
43 Social Media Posts for Movers43 Social Media Posts for Movers
43 Social Media Posts for MoversTractleads4Movers
 
Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)3sidedcube
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processingnurmeen1
 
Android Training Syllabus - Course
Android Training Syllabus - CourseAndroid Training Syllabus - Course
Android Training Syllabus - CourseTOPS Technologies
 
Latest wireless technology
Latest wireless technologyLatest wireless technology
Latest wireless technologynurmeen1
 

Viewers also liked (15)

Enterprise architecture
Enterprise architectureEnterprise architecture
Enterprise architecture
 
Accord de Carthage
Accord de CarthageAccord de Carthage
Accord de Carthage
 
Architecture pitfalls in android development
Architecture pitfalls in android developmentArchitecture pitfalls in android development
Architecture pitfalls in android development
 
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architectureAndroid Training Ahmedabad , Android Course Ahmedabad, Android architecture
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
 
Android course Lesson2
Android course Lesson2Android course Lesson2
Android course Lesson2
 
Android training course
Android training courseAndroid training course
Android training course
 
Indoctrination Ale y Beto
Indoctrination Ale y BetoIndoctrination Ale y Beto
Indoctrination Ale y Beto
 
43 Social Media Posts for Movers
43 Social Media Posts for Movers43 Social Media Posts for Movers
43 Social Media Posts for Movers
 
Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
 
Android course (lecture1)
Android course (lecture1)Android course (lecture1)
Android course (lecture1)
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processing
 
Android Training Syllabus - Course
Android Training Syllabus - CourseAndroid Training Syllabus - Course
Android Training Syllabus - Course
 
Latest wireless technology
Latest wireless technologyLatest wireless technology
Latest wireless technology
 
Android ppt
Android pptAndroid ppt
Android ppt
 

Similar to Android course lesson1

Android Course - Lesson1
Android Course - Lesson1Android Course - Lesson1
Android Course - Lesson1Callum Taylor
 
Social Media for SMEs
Social Media for SMEsSocial Media for SMEs
Social Media for SMEssuw
 
Digital Tools for the Classroom
Digital Tools for the ClassroomDigital Tools for the Classroom
Digital Tools for the ClassroomNAFCareerAcads
 
Seesaw ACAMIS Tom Johnson
Seesaw ACAMIS Tom JohnsonSeesaw ACAMIS Tom Johnson
Seesaw ACAMIS Tom JohnsonThomas Johnson
 
Using video to promote learner voice
Using video to promote learner voiceUsing video to promote learner voice
Using video to promote learner voiceGary Tennant
 
Quick and simple ways to utilise i pads in lessons
Quick and simple ways to utilise i pads in lessonsQuick and simple ways to utilise i pads in lessons
Quick and simple ways to utilise i pads in lessonsDavid Drake
 
App Smashing for Beginners - TCEA 2015
App Smashing for Beginners - TCEA 2015App Smashing for Beginners - TCEA 2015
App Smashing for Beginners - TCEA 2015Diana Benner
 
Twitterpated by twitter and other Web 2.0 tools for instructional purposes
Twitterpated by twitter and other Web 2.0 tools for instructional purposesTwitterpated by twitter and other Web 2.0 tools for instructional purposes
Twitterpated by twitter and other Web 2.0 tools for instructional purposesAlexandra M. Pickett
 
iPads in the Classroom
iPads in the ClassroomiPads in the Classroom
iPads in the ClassroomStaci Trekles
 
MEDEAnet webinar "Mobile Learning" Resources
MEDEAnet webinar "Mobile Learning" ResourcesMEDEAnet webinar "Mobile Learning" Resources
MEDEAnet webinar "Mobile Learning" ResourcesMEDEA Awards
 
Eded20491 T1 2010
Eded20491 T1 2010Eded20491 T1 2010
Eded20491 T1 2010Scot Aldred
 
Eded20491 T1 2010
Eded20491 T1 2010Eded20491 T1 2010
Eded20491 T1 2010Scot Aldred
 
Mastery Journal Timeline by Laurence Ramsey
Mastery Journal Timeline by Laurence Ramsey Mastery Journal Timeline by Laurence Ramsey
Mastery Journal Timeline by Laurence Ramsey Laurence Ramsey
 
App Smashing for Beginners
App Smashing for BeginnersApp Smashing for Beginners
App Smashing for BeginnersDiana Benner
 

Similar to Android course lesson1 (20)

Android Course - Lesson1
Android Course - Lesson1Android Course - Lesson1
Android Course - Lesson1
 
Social Media for SMEs
Social Media for SMEsSocial Media for SMEs
Social Media for SMEs
 
samr model.docx
samr  model.docxsamr  model.docx
samr model.docx
 
Digital Tools for the Classroom
Digital Tools for the ClassroomDigital Tools for the Classroom
Digital Tools for the Classroom
 
SAMR Model
SAMR ModelSAMR Model
SAMR Model
 
Resources
ResourcesResources
Resources
 
Seesaw ACAMIS Tom Johnson
Seesaw ACAMIS Tom JohnsonSeesaw ACAMIS Tom Johnson
Seesaw ACAMIS Tom Johnson
 
Using video to promote learner voice
Using video to promote learner voiceUsing video to promote learner voice
Using video to promote learner voice
 
Quick and simple ways to utilise i pads in lessons
Quick and simple ways to utilise i pads in lessonsQuick and simple ways to utilise i pads in lessons
Quick and simple ways to utilise i pads in lessons
 
App Smashing for Beginners - TCEA 2015
App Smashing for Beginners - TCEA 2015App Smashing for Beginners - TCEA 2015
App Smashing for Beginners - TCEA 2015
 
Twitterpated by twitter and other Web 2.0 tools for instructional purposes
Twitterpated by twitter and other Web 2.0 tools for instructional purposesTwitterpated by twitter and other Web 2.0 tools for instructional purposes
Twitterpated by twitter and other Web 2.0 tools for instructional purposes
 
iPads in the Classroom
iPads in the ClassroomiPads in the Classroom
iPads in the Classroom
 
Region Andina.pptx
Region Andina.pptxRegion Andina.pptx
Region Andina.pptx
 
CapProject.pptx
CapProject.pptxCapProject.pptx
CapProject.pptx
 
MEDEAnet webinar "Mobile Learning" Resources
MEDEAnet webinar "Mobile Learning" ResourcesMEDEAnet webinar "Mobile Learning" Resources
MEDEAnet webinar "Mobile Learning" Resources
 
Eded20491 T1 2010
Eded20491 T1 2010Eded20491 T1 2010
Eded20491 T1 2010
 
Eded20491 T1 2010
Eded20491 T1 2010Eded20491 T1 2010
Eded20491 T1 2010
 
Mastery Journal Timeline by Laurence Ramsey
Mastery Journal Timeline by Laurence Ramsey Mastery Journal Timeline by Laurence Ramsey
Mastery Journal Timeline by Laurence Ramsey
 
App Smashing for Beginners
App Smashing for BeginnersApp Smashing for Beginners
App Smashing for Beginners
 
Daily activities
Daily activitiesDaily activities
Daily activities
 

Recently uploaded

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Recently uploaded (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

Android course lesson1

Editor's Notes

  1. My name is callum, I'm lead android developer and have been at 3SC for 4 years. This is tim and matt and we work for a company called 3 SIDED CUBE. We specialise in making cool mobile apps.
  2. A few examples of our apps, team red cross, first aid for the GPDC, Blood donor for the red cross, Hazards for GDPC, ASPCA, and our latest Trocaire app (plus many more)
  3. "you must be super busy creating all these amazingly cool apps" i hear you say, why are you doing this?
  4. Not out of the kindness of our heart, but because...
  5. we're looking for summer interns to join us in the summer. we're looking for someone who has drive, existing experience and willing to work with me. You can check out out hip blog for more details
  6. So lets get down to business, why make an app
  7. It's 2015, if you dont have an app, you're losing out on valuable business. As it was 10 years ago with the web.
  8. So, what are we going to do in the next 4 weeks?
  9. We're going to remake the BBCNews app, not only because its awful, but because it contains most elements needed to make an app including
  10. But what will the app actually include?
  11. Ok so how are we going to make this app. There are a few ways you can actually build an app, like there are different ways you can write a desktop program. These are some ways, and reasons why they are all bad
  12. You may have used phone gap or jquery before for a uni project. We used it once upon a time when it was still very new. Once. We then moved over to fully native and have never looked back. So you may be asking, well why is it so bad? especially when we're basically told to use this technology. well...
  13. One of the main reasons is, Its REALLY SLOW. If you spend time optimising your javascript to make it as optimised as native, you may as well have just written it natively to begin with. Android as you may or may not know, runs on a JVM called Dalvik, but more recently on ART (lollipop and above). And you may also already know that Java in itself, is slow. Its running an extra layer of abstraction onto of the processor. Adding an ADDITIONAL layout such as javascript can make it EVEN slower, especially if you want to populate a list with a large data set. It's expensive. Not in cost wise, but in memory. You're using a web view which in android is very memory expensive, having to deal with parsing HTML and executing heavy javascript, even vanilla javascript adds to the memory and processing usage of your app. When using web views you're essentially changing what the user is used to. Especially if you're making a cross platform app for IOS and Android, you'll end up compromising on the look of the app (one way of the other, or both) which ultimately leads to a bad user experience. It is VERY slow You'll come to understand how list views work in android, and when you do you'll see why javascript lists are slow compared to native lists
  14. So what's the proper way to develop an app?
  15. Not native as in C++ and the NDK, but native as in raw java development in the Android framework
  16. The frameworks are literally designed for development using native tools such as Java. If they wanted you to use web technologies, it would just be what you would use to make apps. Its HEAVILY optimised for those tiny chips inside your phone, and constantly being developed on Its just all round better, you have more fine grain control over apis, access to new controls and views etc
  17. Before we can start anything, we need to make sure we're all on the same page when it comes to understanding how java works and what an object-orientated programming language is.
  18. Lets take a car as an example. We know that there are lots of different types of cars in the world, but they all share the same principles that make it a car. Lets break it down
  19. In every car (at least i hope) you will find at least A steering wheel a minimum of 3 wheels and breaks A chassis An engine These are all properties of a car, but each property can be slightly different for each car, such as the engine speed, tyre size, chassis colour etc. The property values are different but the properties are the same
  20. So how would this look in code? We have a class here called "car" and 5 inner properties. One for each of the previously mentioned. When we create a new instance of this class, it will have access to all of these properties
  21. Here is an example of us creating a new instance of a car. We could do this a million times and customise each one to have slightly different property values, for example if I wanted 3 wheels instead, i initiate the array with only 3 wheel objects. But what if we want some other form of transport, such as a motorbike? well one of the major benefits of OOP is that we can subclass and inherit different properties.
  22. Lets take a look at a motorbike and see what similarities we have between that and a car. They both have breaks, wheels, chassis and an engine. Although they are different, they are still the same type of object. How would this look in code?
  23. We take the common properties between both types, and create a new class for it, in this instance we will call it Automobile (as they are both automobiles). They share these 4 properties, however we still need a handlebar and steering wheel property. We can create our 2 separate classes, one for car, and one for motorbike, which both extends our automobile class, and then create the class specific properties.
  24. So now we have that, we can instantiate our car and motorbike class. We do the same as we did before, we still have access to the properties due to the hierarchy of the classes, and access to the new property. If we instantiate a new motorbike object, but not keep the left hand operator the class type, but the same instance type (in this case automobile because our motorbike class extends automobile) we wont be able to access our motorbike specific property because it doesn't exist under our automobile class.
  25. So that was properties, the exact same thing applies to methods or functions.
  26. And exactly the same problem occurs with extensions and instance casting for methods.
  27. Ok, so enough of java fundamentals, what about android fundamentals?
  28. Android is made up of 2 parts, our java source files, and our XML backed resource files (and graphical images) These 2 parts are joined together by and auto generated class called "R.java"
  29. Here's what a typical android structure looks like. We have our main code part in the top under the "java" folder, and our xml/graphic backed resources under the "res" folder. Inside the "build" folder is where the "R.java" file will live
  30. One of the main reasons why Android is such an awesome framework compared to iOS, is because of the way the projects are structured. In Android we have whats called 'media qualifiers' for resource folders that tell the operating system when and what to use. In this example we're creating a values folder that will be used only if the device is in portrait. Any resources in this folder will supersede any other resource currently begin used
  31. So the most important part of android development is the Activity/context, so what is an activity? A source file with a context which is responsible for displaying and interacting with the UI and UX of an app. But more specifically, its something that you see on your phone.
  32. A fragment is something still quite recent and is essentially like a "mini" activity. it has its own views and lifecycle, but lives within an Activity. You can have many fragments inside a single activity
  33. So what is a context?
  34. Here's a visual example using the Blood app We can see this screen is an activity. There are 3 main tabs which each hold a single fragment. When you click on one of the items in the list, it pushes you to another activity