WELCOMETOCOMPOSECAMP2022
Hosted
By:
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
TOPIC TIME
Presentation 6:00 - 6:05
Pathway 1 6:05 - 6:35
QNA for pathway 1 6:35 - 6:40
Pathway 2 6:40 - 7:00
QNA for Pathway 2 7:00 - 7:05
Pathway 3 7:05 - 7:25
QNA for Pathway 3 7:25 - 7:30
Quiz 7:30 - 7:35
Today’s Schedule
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
Omveer Panwar
DGI
Aritra Saha
SIT
Aniket Sen
JGEC
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
Unit 1: Your first
Android App
This work is licensed under the Apache 2.0 License
Pathway 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
Pathway 1 Completed!
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
Compose Camp
Android Basics with Compose:
Unit 1 Pathway 2
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
Pathway Overview
This work is licensed under the Apache 2.0 License
Android Studio
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
View
This work is licensed under the Apache 2.0 License
Android Studio - Code View
This work is licensed under the Apache 2.0 License
Android Studio - Design View
This work is licensed under the Apache 2.0 License
Android Studio - Design View
This work is licensed under the Apache 2.0 License
Android Studio - Split View
This work is licensed under the Apache 2.0 License
Android Studio - Split View
This work is licensed under the Apache 2.0 License
Android Studio - Greeting function
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Howdy $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Howdy $name!")
}
This work is licensed under the Apache 2.0 License
DefaultPreview()
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
FirstComposeProjectTheme {
Greeting("Android")
}
}
This work is licensed under the Apache 2.0 License
DefaultPreview()
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
FirstComposeProjectTheme {
Greeting("Meghan")
}
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Howdy $name!")
}
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
FirstComposeProjectTheme {
Greeting("Meghan")
}
}
This work is licensed under the Apache 2.0 License
The Android Emulator emulates Android devices on your computer so
that you can test your application on a variety of devices and Android
API levels without needing to have each physical device.
What is an emulator?
This work is licensed under the Apache 2.0 License
Creating an emulator
This work is licensed under the Apache 2.0 License
Creating an emulator
This work is licensed under the Apache 2.0 License
Favorite Color App
This work is licensed under the Apache 2.0 License
Running your app on
a physical device
This work is licensed under the Apache 2.0 License
Pathway 2 Completed!
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
Unit 1: Pathway 2
This work is licensed under the Apache 2.0 License
Work on Unit 1, Pathway 2
Have a Question?
Just ask
This work is licensed under the Apache 2.0 License
Compose Camp
Android Basics with Compose:
Unit 1 Pathway 3
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
Pathway Overview
This work is licensed under the Apache 2.0 License
Jetpack Compose
This work is licensed under the Apache 2.0 License
A composable function
• Describes some part of your UI.
• Doesn't return anything.
• Takes some input and generates what's shown on the screen.
• Might emit several UI elements.
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Greeting()
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
This work is licensed under the Apache 2.0 License
Pet Adoption App
This work is licensed under the Apache 2.0 License
PetName()
@Composable
fun PetName() {
}
This work is licensed under the Apache 2.0 License
PetName()
@Composable
fun PetName() {
Text()
}
This work is licensed under the Apache 2.0 License
PetName()
@Composable
fun PetName() {
Text(text = "Bark! My name is Koda.")
}
This work is licensed under the Apache 2.0 License
DefaultPreview()
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
PetAdoptionTheme {
PetName()
}
}
This work is licensed under the Apache 2.0 License
DefaultPreview()
This work is licensed under the Apache 2.0 License
PetInformation()
@Composable
fun PetInformation() {
Text(text = "I'm three years old and I like to bark.")
}
This work is licensed under the Apache 2.0 License
Column and Row
Column
Row
This work is licensed under the Apache 2.0 License
DefaultPreview()
This work is licensed under the Apache 2.0 License
PetAdoptionColumn()
@Composable
fun PetAdoptionInformation() {
Column {
}
}
This work is licensed under the Apache 2.0 License
PetAdoptionColumn()
@Composable
fun PetAdoptionInformation() {
Column {
PetName()
PetInformation()
}
}
This work is licensed under the Apache 2.0 License
DefaultPreview()
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
PetAdoptionTheme {
PetAdoptionInformation()
}
}
This work is licensed under the Apache 2.0 License
DefaultPreview()
This work is licensed under the Apache 2.0 License
Resources()
This work is licensed under the Apache 2.0 License
Accessing Resources
R.drawable.koda
This work is licensed under the Apache 2.0 License
Accessing Resources
R.drawable.koda
This work is licensed under the Apache 2.0 License
Accessing Resources
R.drawable.koda
This work is licensed under the Apache 2.0 License
Accessing Resources
R.drawable.koda
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
}
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
val image =
}
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
val image = painterResource(...)
}
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
val image = painterResource(id = R.drawable.koda)
}
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
val image = painterResource(id = R.drawable.koda)
Image(painter = ,
contentDescription = )
}
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
val image = painterResource(id = R.drawable.koda)
Image(painter = image,
contentDescription = )
}
This work is licensed under the Apache 2.0 License
PetImage()
@Composable
fun PetImage() {
val image = painterResource(id = R.drawable.koda)
Image(painter = image,
contentDescription = "Gray and white dog with a collar sitting on a
bed")
}
This work is licensed under the Apache 2.0 License
PetAdoptionInformation()
@Composable
fun PetAdoptionInformation() {
Column {
PetImage()
PetName()
PetInformation()
}
}
This work is licensed under the Apache 2.0 License
This work is licensed under the Apache 2.0 License
Pathway 3 Completed!
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
Unit 1: Pathway 3
This work is licensed under the Apache 2.0 License
Work on Unit 1, Pathway 3
Have a Question?
Just ask
What'smorefunthana
quickendsessionquiz?
This work is licensed under the Apache 2.0 License
Go to: www.slido.com
This work is licensed under the Apache 2.0 License
Enter Code: 3911153
and enter your name
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
THANK YOU

Session 1 ppt.pptx

  • 1.
  • 3.
    This work islicensed 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?
  • 4.
    This work islicensed under the Apache 2.0 License • Basic computer literacy • Basic math skills • Computer & headphones • Internet connection • (Optional) Android device & USB cable Prerequisites
  • 5.
    This work islicensed 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
  • 6.
    This work islicensed under the Apache 2.0 License TOPIC TIME Presentation 6:00 - 6:05 Pathway 1 6:05 - 6:35 QNA for pathway 1 6:35 - 6:40 Pathway 2 6:40 - 7:00 QNA for Pathway 2 7:00 - 7:05 Pathway 3 7:05 - 7:25 QNA for Pathway 3 7:25 - 7:30 Quiz 7:30 - 7:35 Today’s Schedule
  • 7.
    This work islicensed under the Apache 2.0 License A Pathway
  • 8.
    This work islicensed under the Apache 2.0 License Take a Quiz
  • 9.
    This work islicensed under the Apache 2.0 License Earn badges!
  • 10.
    This work islicensed under the Apache 2.0 License Google Developer Profile Carrie Sawyer
  • 12.
  • 15.
    This work islicensed under the Apache 2.0 License Compose Camp Android Basics with Compose: Unit 1 Pathway 1
  • 16.
    This work islicensed under the Apache 2.0 License Unit 1: Your first Android App
  • 17.
    This work islicensed under the Apache 2.0 License Pathway Overview
  • 18.
    This work islicensed under the Apache 2.0 License Kotlin Programming Language Use Kotlin to start writing Android apps. Kotlin helps developers be more productive.
  • 19.
    This work islicensed under the Apache 2.0 License Kotlin Playground Write and run Kotlin code in the browser.
  • 20.
    This work islicensed 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!
  • 21.
    This work islicensed 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!
  • 22.
    This work islicensed 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!
  • 23.
    This work islicensed 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.
  • 24.
    This work islicensed under the Apache 2.0 License Defining a function Functions begin with the fun keyword. fun displayIntroduction() { }
  • 25.
    This work islicensed under the Apache 2.0 License Defining a function Functions have a name so that they can be called. fun displayIntroduction() { }
  • 26.
    This work islicensed 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() { }
  • 27.
    This work islicensed 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() { }
  • 28.
    This work islicensed 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
  • 29.
    This work islicensed under the Apache 2.0 License A container for a single piece of data. Variables
  • 30.
    This work islicensed under the Apache 2.0 License My name is and I am years old Variables name age
  • 31.
    This work islicensed 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
  • 32.
    This work islicensed 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
  • 33.
    This work islicensed 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
  • 34.
    This work islicensed 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 }
  • 35.
    This work islicensed 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 }
  • 36.
    This work islicensed 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 }
  • 37.
    This work islicensed 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 }
  • 38.
    This work islicensed 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") }
  • 39.
    This work islicensed 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
  • 40.
    This work islicensed under the Apache 2.0 License Pathway 1 Completed!
  • 41.
    This work islicensed under the Apache 2.0 License g.co/android/basics-compose Start here:
  • 42.
    This work islicensed under the Apache 2.0 License
  • 43.
    This work islicensed under the Apache 2.0 License Unit 1: Pathway 1
  • 44.
    This work islicensed under the Apache 2.0 License Work on Unit 1, Pathway 1 Have a Question? Just ask
  • 45.
    This work islicensed under the Apache 2.0 License Compose Camp Android Basics with Compose: Unit 1 Pathway 2
  • 46.
    This work islicensed under the Apache 2.0 License Unit 1: Your first Android App
  • 47.
    This work islicensed under the Apache 2.0 License Pathway Overview
  • 48.
    This work islicensed under the Apache 2.0 License Android Studio
  • 49.
    This work islicensed under the Apache 2.0 License Android Studio
  • 50.
    This work islicensed under the Apache 2.0 License Android Studio - Project View
  • 51.
    This work islicensed under the Apache 2.0 License Android Studio - Code View
  • 52.
    This work islicensed under the Apache 2.0 License Android Studio - Design View
  • 53.
    This work islicensed under the Apache 2.0 License Android Studio - Design View
  • 54.
    This work islicensed under the Apache 2.0 License Android Studio - Split View
  • 55.
    This work islicensed under the Apache 2.0 License Android Studio - Split View
  • 56.
    This work islicensed under the Apache 2.0 License Android Studio - Greeting function
  • 57.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 58.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Howdy $name!") }
  • 59.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Howdy $name!") }
  • 60.
    This work islicensed under the Apache 2.0 License DefaultPreview() @Preview(showBackground = true) @Composable fun DefaultPreview() { FirstComposeProjectTheme { Greeting("Android") } }
  • 61.
    This work islicensed under the Apache 2.0 License DefaultPreview() @Preview(showBackground = true) @Composable fun DefaultPreview() { FirstComposeProjectTheme { Greeting("Meghan") } }
  • 62.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Howdy $name!") } @Preview(showBackground = true) @Composable fun DefaultPreview() { FirstComposeProjectTheme { Greeting("Meghan") } }
  • 63.
    This work islicensed under the Apache 2.0 License The Android Emulator emulates Android devices on your computer so that you can test your application on a variety of devices and Android API levels without needing to have each physical device. What is an emulator?
  • 64.
    This work islicensed under the Apache 2.0 License Creating an emulator
  • 65.
    This work islicensed under the Apache 2.0 License Creating an emulator
  • 66.
    This work islicensed under the Apache 2.0 License Favorite Color App
  • 67.
    This work islicensed under the Apache 2.0 License Running your app on a physical device
  • 68.
    This work islicensed under the Apache 2.0 License Pathway 2 Completed!
  • 69.
    This work islicensed under the Apache 2.0 License g.co/android/basics-compose Start here:
  • 70.
    This work islicensed under the Apache 2.0 License Unit 1: Pathway 2
  • 71.
    This work islicensed under the Apache 2.0 License Work on Unit 1, Pathway 2 Have a Question? Just ask
  • 72.
    This work islicensed under the Apache 2.0 License Compose Camp Android Basics with Compose: Unit 1 Pathway 3
  • 73.
    This work islicensed under the Apache 2.0 License Unit 1: Your first Android App
  • 74.
    This work islicensed under the Apache 2.0 License Pathway Overview
  • 75.
    This work islicensed under the Apache 2.0 License Jetpack Compose
  • 76.
    This work islicensed under the Apache 2.0 License A composable function • Describes some part of your UI. • Doesn't return anything. • Takes some input and generates what's shown on the screen. • Might emit several UI elements.
  • 77.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 78.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 79.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 80.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 81.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 82.
    This work islicensed under the Apache 2.0 License Greeting() @Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
  • 83.
    This work islicensed under the Apache 2.0 License Pet Adoption App
  • 84.
    This work islicensed under the Apache 2.0 License PetName() @Composable fun PetName() { }
  • 85.
    This work islicensed under the Apache 2.0 License PetName() @Composable fun PetName() { Text() }
  • 86.
    This work islicensed under the Apache 2.0 License PetName() @Composable fun PetName() { Text(text = "Bark! My name is Koda.") }
  • 87.
    This work islicensed under the Apache 2.0 License DefaultPreview() @Preview(showBackground = true) @Composable fun DefaultPreview() { PetAdoptionTheme { PetName() } }
  • 88.
    This work islicensed under the Apache 2.0 License DefaultPreview()
  • 89.
    This work islicensed under the Apache 2.0 License PetInformation() @Composable fun PetInformation() { Text(text = "I'm three years old and I like to bark.") }
  • 90.
    This work islicensed under the Apache 2.0 License Column and Row Column Row
  • 91.
    This work islicensed under the Apache 2.0 License DefaultPreview()
  • 92.
    This work islicensed under the Apache 2.0 License PetAdoptionColumn() @Composable fun PetAdoptionInformation() { Column { } }
  • 93.
    This work islicensed under the Apache 2.0 License PetAdoptionColumn() @Composable fun PetAdoptionInformation() { Column { PetName() PetInformation() } }
  • 94.
    This work islicensed under the Apache 2.0 License DefaultPreview() @Preview(showBackground = true) @Composable fun DefaultPreview() { PetAdoptionTheme { PetAdoptionInformation() } }
  • 95.
    This work islicensed under the Apache 2.0 License DefaultPreview()
  • 96.
    This work islicensed under the Apache 2.0 License Resources()
  • 97.
    This work islicensed under the Apache 2.0 License Accessing Resources R.drawable.koda
  • 98.
    This work islicensed under the Apache 2.0 License Accessing Resources R.drawable.koda
  • 99.
    This work islicensed under the Apache 2.0 License Accessing Resources R.drawable.koda
  • 100.
    This work islicensed under the Apache 2.0 License Accessing Resources R.drawable.koda
  • 101.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { }
  • 102.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { val image = }
  • 103.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { val image = painterResource(...) }
  • 104.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { val image = painterResource(id = R.drawable.koda) }
  • 105.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { val image = painterResource(id = R.drawable.koda) Image(painter = , contentDescription = ) }
  • 106.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { val image = painterResource(id = R.drawable.koda) Image(painter = image, contentDescription = ) }
  • 107.
    This work islicensed under the Apache 2.0 License PetImage() @Composable fun PetImage() { val image = painterResource(id = R.drawable.koda) Image(painter = image, contentDescription = "Gray and white dog with a collar sitting on a bed") }
  • 108.
    This work islicensed under the Apache 2.0 License PetAdoptionInformation() @Composable fun PetAdoptionInformation() { Column { PetImage() PetName() PetInformation() } }
  • 109.
    This work islicensed under the Apache 2.0 License
  • 110.
    This work islicensed under the Apache 2.0 License Pathway 3 Completed!
  • 111.
    This work islicensed under the Apache 2.0 License g.co/android/basics-compose Start here:
  • 112.
    This work islicensed under the Apache 2.0 License Unit 1: Pathway 3
  • 113.
    This work islicensed under the Apache 2.0 License Work on Unit 1, Pathway 3 Have a Question? Just ask
  • 114.
  • 115.
    This work islicensed under the Apache 2.0 License Go to: www.slido.com
  • 116.
    This work islicensed under the Apache 2.0 License Enter Code: 3911153 and enter your name
  • 117.
    This work islicensed 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
  • 118.
    This work islicensed under the Apache 2.0 License Learn More
  • 119.
    This work islicensed 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
  • 120.

Editor's Notes