SlideShare a Scribd company logo
1 of 47
Download to read offline
This work is licensed under the Apache 2.0 License
Compose Camp
Android Basics with Compose:
Unit 1 Pathway 1
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
● Basic computer literacy
● Basic math skills
● Computer & headphones
● Internet connection
● (Optional) Android device & USB cable
Prerequisites
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
Compose Camp Learning Objectives
This work is licensed under the Apache 2.0 License
1. Why are you here?
2. What are you goals?
3. How do you plan to achieve them?
This work is licensed under the Apache 2.0 License
TOPIC TIME
Presentation 4:00 - 4:15
Your first program in
Kotlin
4:15 - 4:30
Create and use variables
in Kotlin
4:30 - 4:50
Break 4:50 - 5:00
Create and use
functions in Kotlin
5:00 - 5:30
Practice problems 5:30 - 5:45
Wrap up 5:45 - 6:00
Day 1 Schedule
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
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
Session Overview
This work is licensed under the Apache 2.0 License
Kotlin Programming
Language
Use Kotlin to start writing Android apps.
Kotlin helps developers be more
productive.
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
Code
Step by step instructions for
what the computer should do.
fun main() {
println("Hello, world!")
}
Output:
Hello, world!
This work is licensed under the Apache 2.0 License
main Function
The main function is the entry
point, or starting point, of the
program.
Start here
fun main() {
println("Hello, world!")
}
Output:
Hello, world!
This work is licensed under the Apache 2.0 License
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
Putting it together
fun displayIntroduction() {
// We will fill this out!
}
Output:
Hi I’m Meghan and I am 28 years old
This work is licensed under the Apache 2.0 License
A container for a single piece of data.
Variables
This work is licensed under the Apache 2.0 License
My name is and I am years old
Variables
name age
This work is licensed under the Apache 2.0 License
My name is and I am years old
Variables
Name value: Meghan
Age value: 28
Output:
My name is Meghan and I
am 28 years old
Name value: Janet
Age value: 49
Output:
My name is Janet and I
am 49 years old
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
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 variable
This work is licensed under the Apache 2.0 License
Defining a variable
Variables start with a var or val
keyword.
fun displayIntroduction() {
val name: String = "Meghan"
var age: Int = 28
}
This work is licensed under the Apache 2.0 License
Defining a variable
All variables must have a name.
fun displayIntroduction() {
val name: String = "Meghan"
var age: Int = 28
}
This work is licensed under the Apache 2.0 License
Defining a variable
Data type is the type of data
that the variable holds.
fun displayIntroduction() {
val name: String = "Meghan"
var age: Int = 28
}
This work is licensed under the Apache 2.0 License
Defining a variable
The initial value is the value that
is stored in the variable.
fun displayIntroduction() {
val name: String = "Meghan"
var age: Int = 28
}
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
This work is licensed under the Apache 2.0 License
Let’s get started
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
This work is licensed under the Apache 2.0 License
Unit 1: Pathway 1
This work is licensed under the Apache 2.0 License
Work on Unit 1, Pathway 1
Have a Question?
Just ask
This work is licensed under the Apache 2.0 License
Break
This work is licensed under the Apache 2.0 License
Work on Unit 1, Pathway 1
Have a Question?
Just ask
This work is licensed under the Apache 2.0 License
Welcome back
And congrats!
This work is licensed under the Apache 2.0 License
What’s coming next:
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
Learn More
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

More Related Content

Similar to Compose Camp Day 1.pdf

Compose Camp S1.pptx
Compose Camp S1.pptxCompose Camp S1.pptx
Compose Camp S1.pptxGDSCSIT
 
Compose Camp - Unit 1 (1).pptx
Compose Camp - Unit 1 (1).pptxCompose Camp - Unit 1 (1).pptx
Compose Camp - Unit 1 (1).pptxIshwariKulkarni6
 
Session-1 edited.pptx
Session-1 edited.pptxSession-1 edited.pptx
Session-1 edited.pptxscienceTech11
 
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
 
Android study jam iiitv kick-off sesson
Android study jam iiitv   kick-off sessonAndroid study jam iiitv   kick-off sesson
Android study jam iiitv kick-off sessonAshutoshSingh1124
 
[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx
[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx
[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptxshahipc
 
GDSC_day_1.pptx
GDSC_day_1.pptxGDSC_day_1.pptx
GDSC_day_1.pptxGDSCICOER
 
Compose camp 2.pptx
Compose camp 2.pptxCompose camp 2.pptx
Compose camp 2.pptxbcedsc
 
Android study jams
Android study jamsAndroid study jams
Android study jamsNaveenK158
 
Android Development | Compose camp day 3 | GDSC SEC Sasaram.pdf
Android Development | Compose camp day 3 | GDSC SEC Sasaram.pdfAndroid Development | Compose camp day 3 | GDSC SEC Sasaram.pdf
Android Development | Compose camp day 3 | GDSC SEC Sasaram.pdfShivamShrey1
 
Compose_camp_Day_1.pptx
Compose_camp_Day_1.pptxCompose_camp_Day_1.pptx
Compose_camp_Day_1.pptxGanpatParmar1
 
Android study jam session 1
Android study jam session 1Android study jam session 1
Android study jam session 1DSCIIITLucknow
 
Prior programming experience track
Prior programming experience trackPrior programming experience track
Prior programming experience trackAshwinRaj57
 
Week 1 - Android Study Jams
Week 1 - Android Study JamsWeek 1 - Android Study Jams
Week 1 - Android Study JamsJoannaCamille2
 

Similar to Compose Camp Day 1.pdf (20)

Compose Camp S1.pptx
Compose Camp S1.pptxCompose Camp S1.pptx
Compose Camp S1.pptx
 
Compose #1.pptx
Compose #1.pptxCompose #1.pptx
Compose #1.pptx
 
Compose Camp - Unit 1 (1).pptx
Compose Camp - Unit 1 (1).pptxCompose Camp - Unit 1 (1).pptx
Compose Camp - Unit 1 (1).pptx
 
Compose Camp #1.pptx
Compose  Camp #1.pptxCompose  Camp #1.pptx
Compose Camp #1.pptx
 
Session-1.pptx
Session-1.pptxSession-1.pptx
Session-1.pptx
 
Session-1 edited.pptx
Session-1 edited.pptxSession-1 edited.pptx
Session-1 edited.pptx
 
Compose Camp
Compose Camp Compose Camp
Compose Camp
 
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]
 
Android study jam iiitv kick-off sesson
Android study jam iiitv   kick-off sessonAndroid study jam iiitv   kick-off sesson
Android study jam iiitv kick-off sesson
 
Compose Camp Session 1.pdf
Compose Camp Session 1.pdfCompose Camp Session 1.pdf
Compose Camp Session 1.pdf
 
[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx
[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx
[EXTERNAL] Android Basics Sessions 1 _ 2 - Android Study Jams.pptx
 
GDSC_day_1.pptx
GDSC_day_1.pptxGDSC_day_1.pptx
GDSC_day_1.pptx
 
Compose camp 2.pptx
Compose camp 2.pptxCompose camp 2.pptx
Compose camp 2.pptx
 
Android study jams
Android study jamsAndroid study jams
Android study jams
 
Android Development | Compose camp day 3 | GDSC SEC Sasaram.pdf
Android Development | Compose camp day 3 | GDSC SEC Sasaram.pdfAndroid Development | Compose camp day 3 | GDSC SEC Sasaram.pdf
Android Development | Compose camp day 3 | GDSC SEC Sasaram.pdf
 
Compose_camp_Day_1.pptx
Compose_camp_Day_1.pptxCompose_camp_Day_1.pptx
Compose_camp_Day_1.pptx
 
Android study jam session 1
Android study jam session 1Android study jam session 1
Android study jam session 1
 
Compose Camp - Session1.pdf
Compose Camp - Session1.pdfCompose Camp - Session1.pdf
Compose Camp - Session1.pdf
 
Prior programming experience track
Prior programming experience trackPrior programming experience track
Prior programming experience track
 
Week 1 - Android Study Jams
Week 1 - Android Study JamsWeek 1 - Android Study Jams
Week 1 - Android Study Jams
 

More from ShivamShrey1

internal_hackathon_kavach23.pdf
internal_hackathon_kavach23.pdfinternal_hackathon_kavach23.pdf
internal_hackathon_kavach23.pdfShivamShrey1
 
How to get into Full Stack Web Development.pdf
How to get into Full Stack Web Development.pdfHow to get into Full Stack Web Development.pdf
How to get into Full Stack Web Development.pdfShivamShrey1
 
WebDevFundamentals.pdf
WebDevFundamentals.pdfWebDevFundamentals.pdf
WebDevFundamentals.pdfShivamShrey1
 
Flutter & Firebase BootCamp.pdf
Flutter & Firebase BootCamp.pdfFlutter & Firebase BootCamp.pdf
Flutter & Firebase BootCamp.pdfShivamShrey1
 
Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...
Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...
Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...ShivamShrey1
 
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
 

More from ShivamShrey1 (6)

internal_hackathon_kavach23.pdf
internal_hackathon_kavach23.pdfinternal_hackathon_kavach23.pdf
internal_hackathon_kavach23.pdf
 
How to get into Full Stack Web Development.pdf
How to get into Full Stack Web Development.pdfHow to get into Full Stack Web Development.pdf
How to get into Full Stack Web Development.pdf
 
WebDevFundamentals.pdf
WebDevFundamentals.pdfWebDevFundamentals.pdf
WebDevFundamentals.pdf
 
Flutter & Firebase BootCamp.pdf
Flutter & Firebase BootCamp.pdfFlutter & Firebase BootCamp.pdf
Flutter & Firebase BootCamp.pdf
 
Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...
Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...
Community Connect 2023 & Google Solution Challenge | Info Session | GDSC SEC ...
 
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
 

Recently uploaded

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 

Compose Camp Day 1.pdf

  • 1. This work is licensed under the Apache 2.0 License Compose Camp Android Basics with Compose: Unit 1 Pathway 1
  • 2. 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?
  • 3. This work is licensed under the Apache 2.0 License ● Basic computer literacy ● Basic math skills ● Computer & headphones ● Internet connection ● (Optional) Android device & USB cable Prerequisites
  • 4. 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 Compose Camp Learning Objectives
  • 5. This work is licensed under the Apache 2.0 License 1. Why are you here? 2. What are you goals? 3. How do you plan to achieve them?
  • 6. This work is licensed under the Apache 2.0 License TOPIC TIME Presentation 4:00 - 4:15 Your first program in Kotlin 4:15 - 4:30 Create and use variables in Kotlin 4:30 - 4:50 Break 4:50 - 5:00 Create and use functions in Kotlin 5:00 - 5:30 Practice problems 5:30 - 5:45 Wrap up 5:45 - 6:00 Day 1 Schedule
  • 7. This work is licensed under the Apache 2.0 License Android Basics with Compose Course
  • 8. This work is licensed under the Apache 2.0 License Unit 1: Your first Android App
  • 9. This work is licensed under the Apache 2.0 License A Pathway
  • 10. This work is licensed under the Apache 2.0 License Take a Quiz
  • 11. This work is licensed under the Apache 2.0 License Earn badges!
  • 12. This work is licensed under the Apache 2.0 License Google Developer Profile Carrie Sawyer
  • 13. This work is licensed under the Apache 2.0 License Session Overview
  • 14. This work is licensed under the Apache 2.0 License Kotlin Programming Language Use Kotlin to start writing Android apps. Kotlin helps developers be more productive.
  • 15. This work is licensed under the Apache 2.0 License Kotlin Playground Write and run Kotlin code in the browser.
  • 16. 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!
  • 17. This work is licensed under the Apache 2.0 License Code Step by step instructions for what the computer should do. fun main() { println("Hello, world!") } Output: Hello, world!
  • 18. This work is licensed under the Apache 2.0 License main Function The main function is the entry point, or starting point, of the program. Start here fun main() { println("Hello, world!") } Output: Hello, world!
  • 19. This work is licensed under the Apache 2.0 License 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.
  • 20. This work is licensed under the Apache 2.0 License Defining a function Functions begin with the fun keyword. fun displayIntroduction() { }
  • 21. 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() { }
  • 22. 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() { }
  • 23. 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() { }
  • 24. This work is licensed under the Apache 2.0 License Putting it together fun displayIntroduction() { // We will fill this out! } Output: Hi I’m Meghan and I am 28 years old
  • 25. This work is licensed under the Apache 2.0 License A container for a single piece of data. Variables
  • 26. This work is licensed under the Apache 2.0 License My name is and I am years old Variables name age
  • 27. This work is licensed under the Apache 2.0 License My name is and I am years old Variables Name value: Meghan Age value: 28 Output: My name is Meghan and I am 28 years old Name value: Janet Age value: 49 Output: My name is Janet and I am 49 years old name age
  • 28. 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
  • 29. 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 variable
  • 30. This work is licensed under the Apache 2.0 License Defining a variable Variables start with a var or val keyword. fun displayIntroduction() { val name: String = "Meghan" var age: Int = 28 }
  • 31. This work is licensed under the Apache 2.0 License Defining a variable All variables must have a name. fun displayIntroduction() { val name: String = "Meghan" var age: Int = 28 }
  • 32. This work is licensed under the Apache 2.0 License Defining a variable Data type is the type of data that the variable holds. fun displayIntroduction() { val name: String = "Meghan" var age: Int = 28 }
  • 33. This work is licensed under the Apache 2.0 License Defining a variable The initial value is the value that is stored in the variable. fun displayIntroduction() { val name: String = "Meghan" var age: Int = 28 }
  • 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. This work is licensed under the Apache 2.0 License Let’s get started
  • 37. This work is licensed under the Apache 2.0 License g.co/android/basics-compose Start here:
  • 38. This work is licensed under the Apache 2.0 License
  • 39. This work is licensed under the Apache 2.0 License Unit 1: Pathway 1
  • 40. This work is licensed under the Apache 2.0 License Work on Unit 1, Pathway 1 Have a Question? Just ask
  • 41. This work is licensed under the Apache 2.0 License Break
  • 42. This work is licensed under the Apache 2.0 License Work on Unit 1, Pathway 1 Have a Question? Just ask
  • 43. This work is licensed under the Apache 2.0 License Welcome back And congrats!
  • 44. This work is licensed under the Apache 2.0 License What’s coming next:
  • 45. 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
  • 46. This work is licensed under the Apache 2.0 License Learn More
  • 47. 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