SlideShare a Scribd company logo
1 of 58
GDSC
We will start at 10:00AM
This work is licensed under the Apache 2.0 License
Compose Camp
24th September 2022
Introduction to Kotlin
& Jetpack compose
This work is licensed under the Apache 2.0 License
Compose Camp is a hands-on introduction to
learning how you can build Android apps with
Jetpack Compose.
What is Compose Camp?
This work is licensed under the Apache 2.0 License
• Build your first Android apps
• Set up Android Studio on your computer
• Learn the basics of the Kotlin programming language
• Learn Jetpack Compose
• Discover resources to continue learning
• Kickstart your Android Development journey
Compose Camp Learning Objectives
This work is licensed under the Apache 2.0 License
I’m Rohit
Hi, Everyone!
Your Compose Camp
Facilitator😉
This work is licensed under the Apache 2.0 License
I am currently working at IITM as
Machine Learning Project Intern.
Here I am building ML models and
processing multiple algorithm of it on
large dataset.
Where I am Working
This work is licensed under the Apache 2.0 License
2 3 4
1
2019
Simple Coding
Java
2020 2021
Bootcamp and
pear teaching
+
My first Internship
as Android
Developer
2022
Participated in
open source
contribution
+
Regular Coding
+
Internship
First android
project
+
Got to learn
Debugging and
Error solving in
android
My journey
How to learn android ?
• Don't try to remember code.
• Don't hesitate to search error on
StackOverFlow.
• Try collaboration project to
practice.
• Ignore autogenerated files
This work is licensed under the Apache 2.0 License
 Introduction to Jetpack Compose
 Basics of Kotlin
 Overview of Android Studio
 UI element of compose and previews
 Q&A session
Day 1 Agenda
Android Versions
Android Devices
This work is licensed under the Apache 2.0 License
Jetpack Compose
• Jetpack Compose is a modern toolkit
for building native Android UI.
• Jetpack Compose simplifies and
accelerates UI development on
Android with less code, powerful
tools, and intuitive Kotlin APIs.
What was there before compose ?
XML
• Similar to HTML
• Have multiple tags to declare UI
element
Nowadays every tech
industry
• Compose apps are written in the
Kotlin programming language.
• Kotlin is the language that the
majority of professional Android
developers use to build apps.
This work is licensed under the Apache 2.0 License
Kotlin
• Use Kotlin to start writing Android apps.
• Kotlin helps developers be more
productive.
• Improved Java
• Works on JVM
This work is licensed under the Apache 2.0 License
Kotlin Playground
Write and run Kotlin code in
the browser.
This work is licensed under the Apache 2.0 License
Program
A series of instructions for
a computer to perform
some action.
fun main() {
println("Hello, world!")
}
Output:
Hello, world!
This work is licensed under the Apache 2.0 License
A container for a single piece of data.
Attribute or Variables
This work is licensed under the Apache 2.0 License
fun main() {
val name: String = "Meghan"
var age: Int = 28
}
Defining a Attribute
Variables start with a var or val
keyword.
This work is licensed under the Apache 2.0 License
val keyword
Use when you expect the variable value will
not change.
Example: name
var keyword
Use when you expect the variable value can
change.
Example: age
Defining a Attribute
This work is licensed under the Apache 2.0 License
My name is and I am years
old.
Attribute
name age
This work is licensed under the Apache 2.0 License
Basic data types
Kotlin Data
type
What kind of data it can contain Example literal values
String Text “Add contact”
“Search”
Int Whole integer number 32
-59873
Double Decimal number 2.0
-37123.9999
Float Decimal number (less precise than a
Double). Has an f or F at the end of the
number.
5.0f
-1630.209f
Boolean true or false. Use this data type when
there are only two possible values.
true
false
Functions
A function is a segment of a program that performs
a specific task.
You can have many functions in your program or
only a single one.
This work is licensed under the Apache 2.0 License
Defining a function
Functions begin with the fun
keyword.
fun displayIntroduction() {
}
This work is licensed under the Apache 2.0 License
Defining a function
Functions have a name so that
they can be called. fun displayIntroduction() {
}
This work is licensed under the Apache 2.0 License
Defining a function
Functions need a set of parentheses
after the function name in order to
surround the function inputs.
fun displayIntroduction() {
}
This work is licensed under the Apache 2.0 License
Defining a function
The curly braces make up the
function body and contain the
instructions needed to execute
a task.
fun displayIntroduction() {
}
This work is licensed under the Apache 2.0 License
Functions
fun displayIntroduction() {
val name: String = "Meghan"
var age: Int = 28
}
fun displayIntroduction() {
val name = "Meghan"
var age = 28
}
1
2
This work is licensed under the Apache 2.0 License
Putting it together
fun displayIntroduction() {
val name = "Meghan"
val age = 28
println("Hi I'm $name and I am $age years old")
}
This work is licensed under the Apache 2.0 License
Putting it together
fun main() {
displayIntroduction()
}
fun displayIntroduction() {
val name = "Meghan"
val age = 28
println("Hi I'm $name and I am $age years old")
}
Output:
Hi I’m Meghan and I am 28 years old
Session Break
This work is licensed under the Apache 2.0 License
Android Studio
This work is licensed under the Apache 2.0 License
Android Studio
Project Structure
This work is licensed under the Apache 2.0 License
AndroidManifest.xml
This work is licensed under the Apache 2.0 License
Composable and Higher Order function
Annotation
-@Composable
-@Preview
This work is licensed under the Apache 2.0 License
Basic functions of Jetpack Compose
• Text
• Column
• Row
• Box
This work is licensed under the Apache 2.0 License
Basic Layouts
This work is licensed under the Apache 2.0 License
This work is licensed under the Apache 2.0 License
Let’s talk about
Resources
This work is licensed under the Apache 2.0 License
g.co/android/basics-compose
Start here:
This work is licensed under the Apache 2.0 License
Android Basics
with Compose Course
This work is licensed under the Apache 2.0 License
This work is licensed under the Apache 2.0 License
Unit 1: Your first
Android App
This work is licensed under the Apache 2.0 License
A Pathway
This work is licensed under the Apache 2.0 License
Take a Quiz
This work is licensed under the Apache 2.0 License
Earn badges!
This work is licensed under the Apache 2.0 License
Google Developer
Profile
Carrie Sawyer
This work is licensed under the Apache 2.0 License
See you at the next Compose Camp Session!
Optional resources to check out:
• Official Android Developers Site: developer.android.com
• Official Android Developers Blog (for announcements)
• Android Developers Medium Blog (for more technical articles)
• Android Developers YouTube channel
• Follow @AndroidDev on Twitter
• Follow @AndroidDev on LinkedIn
• Subscribe to the Android Developer Newsletter
• Kotlin 101 course
This work is licensed under the Apache 2.0 License
Share what you’ve
learned using
.#ComposeCamp
on social media
For a chance to be
featured by Android,
submit your tips on
learning Compose to
goo.gle/compose-tips
This work is licensed under the Apache 2.0 License
Q&A
This work is licensed under the Apache 2.0 License
THANK YOU
for participating Compose Camp Day 1
Do participate next session as well

More Related Content

Similar to Session-1.pptx

Session 1 ppt.pptx
Session 1 ppt.pptxSession 1 ppt.pptx
Session 1 ppt.pptxSumit766160
 
Compose camp 2.pptx
Compose camp 2.pptxCompose camp 2.pptx
Compose camp 2.pptxbcedsc
 
Android Study Jam 1 Day 1 | December 2021 | GDSC BVCOENM
Android Study Jam 1 Day 1 | December 2021 | GDSC BVCOENMAndroid Study Jam 1 Day 1 | December 2021 | GDSC BVCOENM
Android Study Jam 1 Day 1 | December 2021 | GDSC BVCOENMGDSCBVCOENM
 
DSC Android Study Jam
DSC Android Study JamDSC Android Study Jam
DSC Android Study JamDSC GVP
 
Google Solution Challenge Android Awesomeness.pptx
Google Solution Challenge Android Awesomeness.pptxGoogle Solution Challenge Android Awesomeness.pptx
Google Solution Challenge Android Awesomeness.pptxGoogleDeveloperStude22
 
Android Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdf
Android Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdfAndroid Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdf
Android Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdfShivamShrey1
 
Compose Camp Day 1.pdf
Compose Camp Day 1.pdfCompose Camp Day 1.pdf
Compose Camp Day 1.pdfShivamShrey1
 
Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]PragatiVerma31
 
Compose Camp#2 - Kotlin Basics.pptx
Compose Camp#2 - Kotlin Basics.pptxCompose Camp#2 - Kotlin Basics.pptx
Compose Camp#2 - Kotlin Basics.pptxSumirVats
 
Google DSC Android Study Jams Session 1
Google DSC Android Study Jams Session 1Google DSC Android Study Jams Session 1
Google DSC Android Study Jams Session 1BeauWilliams7
 
Prior programming experience track
Prior programming experience trackPrior programming experience track
Prior programming experience trackAshwinRaj57
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptxRishiGandhi19
 
Vit bhopal android study jams 2.0 session 1
Vit bhopal android study jams 2.0 session 1Vit bhopal android study jams 2.0 session 1
Vit bhopal android study jams 2.0 session 1ishik1
 
Android study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSPAndroid study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSPDomendra Sahu
 
Compose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdfCompose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdfAryanKhandelwal35
 
Android study jams
Android study jamsAndroid study jams
Android study jamsNaveenK158
 
Compose Camp Slide Deck Template.pptx
Compose Camp Slide Deck Template.pptxCompose Camp Slide Deck Template.pptx
Compose Camp Slide Deck Template.pptxGoogleDeveloperStude1
 

Similar to Session-1.pptx (20)

Session 1 ppt.pptx
Session 1 ppt.pptxSession 1 ppt.pptx
Session 1 ppt.pptx
 
day1.docx
day1.docxday1.docx
day1.docx
 
Compose camp 2.pptx
Compose camp 2.pptxCompose camp 2.pptx
Compose camp 2.pptx
 
Android Study Jam 1 Day 1 | December 2021 | GDSC BVCOENM
Android Study Jam 1 Day 1 | December 2021 | GDSC BVCOENMAndroid Study Jam 1 Day 1 | December 2021 | GDSC BVCOENM
Android Study Jam 1 Day 1 | December 2021 | GDSC BVCOENM
 
DSC Android Study Jam
DSC Android Study JamDSC Android Study Jam
DSC Android Study Jam
 
Compose Camp.pptx
Compose Camp.pptxCompose Camp.pptx
Compose Camp.pptx
 
Google Solution Challenge Android Awesomeness.pptx
Google Solution Challenge Android Awesomeness.pptxGoogle Solution Challenge Android Awesomeness.pptx
Google Solution Challenge Android Awesomeness.pptx
 
Android Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdf
Android Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdfAndroid Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdf
Android Development | Compose Camp Day 1 | GDSC SEC Sasaram.pdf
 
Compose Camp Day 1.pdf
Compose Camp Day 1.pdfCompose Camp Day 1.pdf
Compose Camp Day 1.pdf
 
Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]Android Study Jams - New to Programming [27th december]
Android Study Jams - New to Programming [27th december]
 
Compose Camp#2 - Kotlin Basics.pptx
Compose Camp#2 - Kotlin Basics.pptxCompose Camp#2 - Kotlin Basics.pptx
Compose Camp#2 - Kotlin Basics.pptx
 
Google DSC Android Study Jams Session 1
Google DSC Android Study Jams Session 1Google DSC Android Study Jams Session 1
Google DSC Android Study Jams Session 1
 
Prior programming experience track
Prior programming experience trackPrior programming experience track
Prior programming experience track
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx
 
Vit bhopal android study jams 2.0 session 1
Vit bhopal android study jams 2.0 session 1Vit bhopal android study jams 2.0 session 1
Vit bhopal android study jams 2.0 session 1
 
Android study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSPAndroid study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSP
 
Compose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdfCompose Camp Slide.pptx (1).pdf
Compose Camp Slide.pptx (1).pdf
 
Android study jams
Android study jamsAndroid study jams
Android study jams
 
Compose Camp Slide Deck Template.pptx
Compose Camp Slide Deck Template.pptxCompose Camp Slide Deck Template.pptx
Compose Camp Slide Deck Template.pptx
 

More from RamshaAshraf12

More from RamshaAshraf12 (8)

Info session of GDSC GHRCEM.pdf
Info session of GDSC GHRCEM.pdfInfo session of GDSC GHRCEM.pdf
Info session of GDSC GHRCEM.pdf
 
ML GDSC GHRECM.pptx
ML GDSC GHRECM.pptxML GDSC GHRECM.pptx
ML GDSC GHRECM.pptx
 
GCCP Session #1 - Getting Started with GCP.pptx
GCCP Session #1 - Getting Started with GCP.pptxGCCP Session #1 - Getting Started with GCP.pptx
GCCP Session #1 - Getting Started with GCP.pptx
 
Git + GitHub 1.0.pptx
Git + GitHub 1.0.pptxGit + GitHub 1.0.pptx
Git + GitHub 1.0.pptx
 
session4.pptx
session4.pptxsession4.pptx
session4.pptx
 
session3.pptx
session3.pptxsession3.pptx
session3.pptx
 
session2.pptx
session2.pptxsession2.pptx
session2.pptx
 
Info session.pptx
Info session.pptxInfo session.pptx
Info session.pptx
 

Recently uploaded

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 

Session-1.pptx

  • 1. GDSC We will start at 10:00AM
  • 2.
  • 3. This work is licensed under the Apache 2.0 License Compose Camp 24th September 2022 Introduction to Kotlin & Jetpack compose
  • 4. This work is licensed under the Apache 2.0 License Compose Camp is a hands-on introduction to learning how you can build Android apps with Jetpack Compose. What is Compose Camp?
  • 5. This work is licensed under the Apache 2.0 License • Build your first Android apps • Set up Android Studio on your computer • Learn the basics of the Kotlin programming language • Learn Jetpack Compose • Discover resources to continue learning • Kickstart your Android Development journey Compose Camp Learning Objectives
  • 6. This work is licensed under the Apache 2.0 License I’m Rohit Hi, Everyone! Your Compose Camp Facilitator😉
  • 7. This work is licensed under the Apache 2.0 License I am currently working at IITM as Machine Learning Project Intern. Here I am building ML models and processing multiple algorithm of it on large dataset. Where I am Working
  • 8. This work is licensed under the Apache 2.0 License 2 3 4 1 2019 Simple Coding Java 2020 2021 Bootcamp and pear teaching + My first Internship as Android Developer 2022 Participated in open source contribution + Regular Coding + Internship First android project + Got to learn Debugging and Error solving in android My journey
  • 9. How to learn android ? • Don't try to remember code. • Don't hesitate to search error on StackOverFlow. • Try collaboration project to practice. • Ignore autogenerated files
  • 10. This work is licensed under the Apache 2.0 License  Introduction to Jetpack Compose  Basics of Kotlin  Overview of Android Studio  UI element of compose and previews  Q&A session Day 1 Agenda
  • 11.
  • 14. This work is licensed under the Apache 2.0 License Jetpack Compose • Jetpack Compose is a modern toolkit for building native Android UI. • Jetpack Compose simplifies and accelerates UI development on Android with less code, powerful tools, and intuitive Kotlin APIs.
  • 15. What was there before compose ?
  • 16. XML • Similar to HTML • Have multiple tags to declare UI element
  • 18.
  • 19. • Compose apps are written in the Kotlin programming language. • Kotlin is the language that the majority of professional Android developers use to build apps.
  • 20. This work is licensed under the Apache 2.0 License Kotlin • Use Kotlin to start writing Android apps. • Kotlin helps developers be more productive. • Improved Java • Works on JVM
  • 21. This work is licensed under the Apache 2.0 License Kotlin Playground Write and run Kotlin code in the browser.
  • 22. This work is licensed under the Apache 2.0 License Program A series of instructions for a computer to perform some action. fun main() { println("Hello, world!") } Output: Hello, world!
  • 23. This work is licensed under the Apache 2.0 License A container for a single piece of data. Attribute or Variables
  • 24. This work is licensed under the Apache 2.0 License fun main() { val name: String = "Meghan" var age: Int = 28 } Defining a Attribute Variables start with a var or val keyword.
  • 25. This work is licensed under the Apache 2.0 License val keyword Use when you expect the variable value will not change. Example: name var keyword Use when you expect the variable value can change. Example: age Defining a Attribute
  • 26. This work is licensed under the Apache 2.0 License My name is and I am years old. Attribute name age
  • 27. This work is licensed under the Apache 2.0 License Basic data types Kotlin Data type What kind of data it can contain Example literal values String Text “Add contact” “Search” Int Whole integer number 32 -59873 Double Decimal number 2.0 -37123.9999 Float Decimal number (less precise than a Double). Has an f or F at the end of the number. 5.0f -1630.209f Boolean true or false. Use this data type when there are only two possible values. true false
  • 28. Functions A function is a segment of a program that performs a specific task. You can have many functions in your program or only a single one.
  • 29. This work is licensed under the Apache 2.0 License Defining a function Functions begin with the fun keyword. fun displayIntroduction() { }
  • 30. This work is licensed under the Apache 2.0 License Defining a function Functions have a name so that they can be called. fun displayIntroduction() { }
  • 31. This work is licensed under the Apache 2.0 License Defining a function Functions need a set of parentheses after the function name in order to surround the function inputs. fun displayIntroduction() { }
  • 32. This work is licensed under the Apache 2.0 License Defining a function The curly braces make up the function body and contain the instructions needed to execute a task. fun displayIntroduction() { }
  • 33. This work is licensed under the Apache 2.0 License Functions fun displayIntroduction() { val name: String = "Meghan" var age: Int = 28 } fun displayIntroduction() { val name = "Meghan" var age = 28 } 1 2
  • 34. This work is licensed under the Apache 2.0 License Putting it together fun displayIntroduction() { val name = "Meghan" val age = 28 println("Hi I'm $name and I am $age years old") }
  • 35. This work is licensed under the Apache 2.0 License Putting it together fun main() { displayIntroduction() } fun displayIntroduction() { val name = "Meghan" val age = 28 println("Hi I'm $name and I am $age years old") } Output: Hi I’m Meghan and I am 28 years old
  • 36.
  • 38. This work is licensed under the Apache 2.0 License Android Studio
  • 39. This work is licensed under the Apache 2.0 License Android Studio
  • 40. Project Structure This work is licensed under the Apache 2.0 License
  • 41. AndroidManifest.xml This work is licensed under the Apache 2.0 License
  • 42.
  • 43. Composable and Higher Order function Annotation -@Composable -@Preview This work is licensed under the Apache 2.0 License
  • 44. Basic functions of Jetpack Compose • Text • Column • Row • Box This work is licensed under the Apache 2.0 License
  • 45. Basic Layouts This work is licensed under the Apache 2.0 License
  • 46. This work is licensed under the Apache 2.0 License Let’s talk about Resources
  • 47. This work is licensed under the Apache 2.0 License g.co/android/basics-compose Start here:
  • 48. This work is licensed under the Apache 2.0 License Android Basics with Compose Course
  • 49. This work is licensed under the Apache 2.0 License
  • 50. This work is licensed under the Apache 2.0 License Unit 1: Your first Android App
  • 51. This work is licensed under the Apache 2.0 License A Pathway
  • 52. This work is licensed under the Apache 2.0 License Take a Quiz
  • 53. This work is licensed under the Apache 2.0 License Earn badges!
  • 54. This work is licensed under the Apache 2.0 License Google Developer Profile Carrie Sawyer
  • 55. This work is licensed under the Apache 2.0 License See you at the next Compose Camp Session! Optional resources to check out: • Official Android Developers Site: developer.android.com • Official Android Developers Blog (for announcements) • Android Developers Medium Blog (for more technical articles) • Android Developers YouTube channel • Follow @AndroidDev on Twitter • Follow @AndroidDev on LinkedIn • Subscribe to the Android Developer Newsletter • Kotlin 101 course
  • 56. This work is licensed under the Apache 2.0 License Share what you’ve learned using .#ComposeCamp on social media For a chance to be featured by Android, submit your tips on learning Compose to goo.gle/compose-tips
  • 57. This work is licensed under the Apache 2.0 License Q&A
  • 58. This work is licensed under the Apache 2.0 License THANK YOU for participating Compose Camp Day 1 Do participate next session as well

Editor's Notes

  1. 04.10.2022
  2. 04.10.2022
  3. 04.10.2022
  4. 04.10.2022
  5. 04.10.2022
  6. 04.10.2022
  7. 04.10.2022
  8. Before starting with actual session There are 3 tips from my side.
  9. 04.10.2022
  10. Ok What is this? Its android tell me what actually android is Anyone, it is an OS by google like ur windows. No big deal ------ tell me current version of android that is rolled out ------ android oreo kitkat, jellybean patta hai
  11. 04.10.2022
  12. Any guess
  13. Xml is kind of similar to HTML not exactly but has tags and all this an example of xml textview. To avoid multiple conflict happening due to xml googles official now says use jetpack c. Conflict – huge hardcoded code size and performance Cause compose is more about composite function we can call a fuction multiple time with writing same thing again and again. Lets take example if you want multiple textview in UI you will need to create tht many tags but if its about compose will just make it as function call it multiple time
  14. Actually this is happing Its not like we will never gonna use xml. we are still using it has it own benefit but let it be lets talk about how we are staring jetpack compose.
  15. Ok what this symbol signifies anyone ? What is extension for kotlin file anyone pls? Ya its kotlin , will just discuss some basic concept like variable and method declaration in kt
  16. 04.10.2022
  17. 04.10.2022
  18. 04.10.2022
  19. 04.10.2022
  20. 04.10.2022
  21. 04.10.2022
  22. 04.10.2022
  23. 04.10.2022
  24. 04.10.2022
  25. 04.10.2022
  26. 04.10.2022
  27. 04.10.2022
  28. 04.10.2022
  29. 04.10.2022
  30. 04.10.2022
  31. 04.10.2022
  32. 04.10.2022
  33. Now lets talk about what jetpack code look like
  34. 04.10.2022
  35. 04.10.2022
  36. 04.10.2022
  37. 04.10.2022
  38. 04.10.2022
  39. 04.10.2022
  40. 04.10.2022
  41. 04.10.2022
  42. 04.10.2022
  43. 04.10.2022
  44. 04.10.2022
  45. 04.10.2022
  46. 04.10.2022