0% found this document useful (0 votes)
166 views

Intro To Programming Android Developers Merged

Uploaded by

Thuan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views

Intro To Programming Android Developers Merged

Uploaded by

Thuan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

01:08 02/02/2024 Intro to Programming | Android Developers

Intro to Programming
Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-1-pathway-1#quiz-/courses/quizzes/andro

1. Which of the following variable declarations is valid?

radio_button_unchecked var hello: Int? = ""

radio_button_unchecked String "hello" = hello

radio_button_checked val Correct!


hello = "hello"
check_circle_outline

radio_button_unchecked hello: String = "hello"

2. It is considered best practice to declare a variable that will not change using var instead of val .

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

3. Which of the following are valid ways to update a variable?


Choose as many answers as you see fit.

check_box total++ Correct!


check_circle_outline

check_box_outline_blank total - 1

check_box total-- Correct!


check_circle_outline

check_box total Correct!


= total + 1
check_circle_outline

4. In Kotlin, comments can be single or multi-line and are ignored by the compiler.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

5. Which of the following is not a data type in Kotlin?

radio_button_unchecked String
radio_button_checked Decimal Correct!
check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-1/android-basics-compose-unit-1-pathway-1?continue=https… 1/4
01:08 02/02/2024 Intro to Programming | Android Developers

radio_button_unchecked Int
radio_button_unchecked Boolean

6. Float also represents a decimal, but is less precise than Double .

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

7. In Kotlin, the entrypoint of a program is the ___.

radio_button_unchecked println() statement


radio_button_unchecked val variable
radio_button_checked main() function Correct!
check_circle_outline

radio_button_unchecked return statement

8. Which of the following are true about function return values?


Choose as many answers as you see fit.

check_box If a function does not specify a return type, the return type is Unit . Correct!
check_circle_outline

check_box A return value can be stored in a variable. Correct!


check_circle_outline

check_box_outline_blank Functions with a return type of Unit must include a return statement.
check_box A return value's type must match the return type of a function. Correct!
check_circle_outline

9. Which of the following are true about functions?


Choose as many answers as you see fit.

check_box Functions can take parameters, or variables as inputs. Correct!


check_circle_outline

check_box_outline_blank Function parameters are required to have default arguments.


check_box When calling a function with parameters, the values passed in are called arguments. Correct!
check_circle_outline

check_box Breaking up your code into separate functions makes your code easier to maintain. Correct!
check_circle_outline

10. With named arguments, you can change the order in which you pass arguments into a function.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-1/android-basics-compose-unit-1-pathway-1?continue=https… 2/4
01:08 02/02/2024 Intro to Programming | Android Developers

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Introduction to


programming in Kotlin badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-1/android-basics-compose-unit-1-pathway-1?continue=https… 3/4
01:08 02/02/2024 Intro to Programming | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-1/android-basics-compose-unit-1-pathway-1?continue=https… 4/4
01:13 02/02/2024 Set up Android Studio | Android Developers

Set up Android Studio


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-1-pathway-2?authuser=1#quiz-/courses/q

1. What does IDE stand for?

radio_button_checked Integrated Development Environment Correct!


check_circle_outline

radio_button_unchecked Independent Design Environment


radio_button_unchecked Ideal Developer Environment
radio_button_unchecked Intelligent Design Environment

2. Which of the following are advantages of using Android Studio?


Choose as many answers as you see fit.

check_box It can help prevent typos and other mistakes in your code. Correct!
check_circle_outline

check_box It comes with a virtual device called an emulator that can run your app. Correct!
check_circle_outline

check_box It can show you a real-time preview of how your app will look on-screen while you code. Correct!
check_circle_outline

check_box_outline_blank It can automatically translate your app into other languages.

3. What is the purpose of using a virtual device, or emulator, in Android Studio?

radio_button_unchecked To show a variety of error messages to users


radio_button_unchecked To experiment with app code safely
radio_button_checked To test your app on a device without having that physical device Correct!
check_circle_outline

radio_button_unchecked To see what your app looks like in a web browser

4. In Android Studio, what is a project template good for?


Choose as many answers as you see fit.

check_box_outline_blank It causes Android Studio to download files faster.


check_box It makes getting started on building a new app faster. Correct!
check_circle_outline

check_box It provides a structure that follows best practices. Correct!


check_circle_outline

check_box_outline_blank It is the only way to build apps that can be previewed in Android Studio.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-2/android-basics-compose-unit-1-pathway-2?authuser=1&con… 1/4
01:13 02/02/2024 Set up Android Studio | Android Developers

check_box It makes building a new app less error-prone by pre-populating the project with some app code. Correct!
check_circle_outline

5. How do you create a new project in Android Studio?

radio_button_unchecked A. Log out of Android Studio, and navigate to your project folder to find instructions.
radio_button_unchecked B. If you have a project already open, select File > New > New Project from the Android Studio menu.
radio_button_unchecked C. In the “Welcome to Android Studio” window, click “Start a new Android Studio project.”
radio_button_unchecked D. Create a new file on your computer, and title it “New Android Studio Project."
radio_button_checked Both B and C are ways to create a new project in Android Studio. Correct!
check_circle_outline

radio_button_unchecked None of the above

6. ___ is a function that is used to define a layout in your app using Composable functions.

radio_button_unchecked ComponentActivity()
radio_button_unchecked onCreate()
radio_button_unchecked DefaultPreview()
radio_button_checked setContent() Correct!
check_circle_outline

7. A Compose function requires the @Composable annotation.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

8. A ___ is a Composable that has a background color and can contain other Composables.

radio_button_unchecked Color
radio_button_unchecked Container
radio_button_checked Surface Correct!
check_circle_outline

radio_button_unchecked Box

9. Padding is an example of a ___

radio_button_unchecked Property
radio_button_unchecked Composable
radio_button_unchecked Attribute

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-2/android-basics-compose-unit-1-pathway-2?authuser=1&con… 2/4
01:13 02/02/2024 Set up Android Studio | Android Developers

radio_button_checked Modifier Correct!


check_circle_outline

10. Which of the following is false about Compose?

radio_button_unchecked The Empty Compose Activity template is used to create a simple app.
radio_button_unchecked Layouts can be viewed in the Preview window, without actually running your app.
radio_button_checked All elements and themes in a Compose app are contained in a Surface. Correct!
check_circle_outline

radio_button_unchecked Themes, such as GreetingCardTheme allow you to style Composables.

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Set up Android


Studio badge!
The badge has been added to your profile.

Share

link

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-2/android-basics-compose-unit-1-pathway-2?authuser=1&con… 3/4
01:13 02/02/2024 Set up Android Studio | Android Developers

(https:/
/develo Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp
per.and
roid.co
m/cours View profile (https://developers.google.com/profile/u/105937894638304689837?authuser=1&
es/quizz
es/andr
oid-
basics-
compos
e-unit-
1-
pathwa
y-
2/androi
d-
basics-
compos
e-unit-
1-
pathwa
y-2?
authuse
r=1&con
tinue=ht
tps%3

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-2/android-basics-compose-unit-1-pathway-2?authuser=1&con… 4/4
01:15 02/02/2024 Build a basic layout | Android Developers

Build a basic layout


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-1-pathway-3#quiz-/courses/quizzes/andro

1. What is Jetpack Compose?

radio_button_checked A Modern toolkit to develop Android UI Correct!


check_circle_outline

radio_button_unchecked Toolkit to design libraries


radio_button_unchecked Database Interface
radio_button_unchecked Plugin to build APK

2. Composable functions are the basic building block of Compose.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

3. What annotation is used to annotate a Composable function?

radio_button_unchecked @Annotation
radio_button_unchecked @ComposableFunction
radio_button_checked @Composable Correct!
check_circle_outline

radio_button_unchecked @Preview

4. The three basic standard layout elements in Compose are


Choose as many answers as you see fit.

check_box Column Correct!


check_circle_outline

check_box Row Correct!


check_circle_outline

check_box_outline_blank Text
check_box Box Correct!
check_circle_outline

5. What is the tool window for importing, creating, managing, and using resources in your app?

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-3/android-basics-compose-unit-1-pathway-3?continue=https… 1/4
01:15 02/02/2024 Build a basic layout | Android Developers

radio_button_unchecked Application Manager


radio_button_checked Resource Manager Correct!
check_circle_outline

radio_button_unchecked Resource Tool


radio_button_unchecked Layout Manager

6. Which class is an automatically generated class by Android that contains the IDs of all resources in the project.

radio_button_unchecked The Android class


radio_button_unchecked The Resource class
radio_button_checked The R Class Correct!
check_circle_outline

radio_button_unchecked The ResourceID class

7. Which function is used is to load a drawable image resource.

radio_button_unchecked The stringResource() function


radio_button_checked The painterResource() function Correct!
check_circle_outline

radio_button_unchecked The ImageResource() function


radio_button_unchecked The loadResource() function

8. What is the function parameter used to add accessibility text, used by talkback?

radio_button_unchecked accessibilityText
radio_button_unchecked contentText
radio_button_unchecked accessibilityDescription
radio_button_checked contentDescription Correct!
check_circle_outline

9. The Box layout stacks the UI elements on top of one another.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

10. What parameter is used to align the child element to the beginning of the parent?

radio_button_unchecked Alignment.End
radio_button_unchecked Alignment.Begin

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-3/android-basics-compose-unit-1-pathway-3?continue=https… 2/4
01:15 02/02/2024 Build a basic layout | Android Developers

radio_button_checked Alignment.Start Correct!


check_circle_outline

radio_button_unchecked Alignment.Top

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Build a Basic


Layout badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-3/android-basics-compose-unit-1-pathway-3?continue=https… 3/4
01:15 02/02/2024 Build a basic layout | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
1-
pathwa
y-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-1-pathway-3/android-basics-compose-unit-1-pathway-3?continue=https… 4/4
01:18 02/02/2024 Kotlin fundamentals | Android Developers

Kotlin fundamentals
Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-1#quiz-/courses/quizzes/andro

1. The following code will print "Divisible by 5" if number is equal to 25 .

if (number % 10 == 0) {
println("Divisible by 10")
} else if (number == 5) {
println("Divisible by 5")
}

radio_button_unchecked true
radio_button_checked false Correct!
check_circle_outline

2. Which of the following conditions are satisfied when x = 5 ?


Choose as many answers as you see fit.

check_box x Correct!
== 5
check_circle_outline

check_box x Correct!
in 1..5
check_circle_outline

check_box x Correct!
is Int
check_circle_outline

check_box_outline_blank x % 5

3. Which is not a basic concept of object-oriented programming

radio_button_unchecked Abstraction
radio_button_checked Readability Correct!
check_circle_outline

radio_button_unchecked Inheritance
radio_button_unchecked Polymorphism

4. Which are the four visibility modifiers in Kotlin?

radio_button_unchecked public , private , protected , abstract


radio_button_unchecked static , override , internal , external
radio_button_checked private , protected , public , internal Correct!
check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-1/android-basics-compose-unit-2-pathway-1?continue=https… 1/3
01:18 02/02/2024 Kotlin fundamentals | Android Developers

radio_button_unchecked public , protected , static , internal

5. The ___ keyword is used to call a method from the parent class.

radio_button_unchecked this
radio_button_checked super Correct!
check_circle_outline

radio_button_unchecked parent
radio_button_unchecked self

6. A(n) ___ defines properties or methods that a class needs to implement.

radio_button_unchecked Delegate
radio_button_unchecked Generic type
radio_button_checked Interface Correct!
check_circle_outline

radio_button_unchecked Subclass

7. Which of the following is best represented by a nullable type?

radio_button_unchecked The number of followers (0 or more) in a social media app.


radio_button_checked An optional profile picture. Correct!
check_circle_outline

radio_button_unchecked A username that must be at least one character.


radio_button_unchecked A unique ID given to every user.

8. The ___ operator allows you to call a method only if the object is non-null.

radio_button_unchecked .
radio_button_unchecked !!
radio_button_unchecked ?:
radio_button_checked ?. Correct!
check_circle_outline

9. Which is not true of functions in Kotlin?

radio_button_checked A function can be changed to another data type, and vice versa. Correct!
check_circle_outline

radio_button_unchecked A function can be returned from another function.


radio_button_unchecked A function can take another function as a parameter.
radio_button_unchecked A function has a data type, such as (Int) -> Unit .

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-1/android-basics-compose-unit-2-pathway-1?continue=https… 2/3
01:18 02/02/2024 Kotlin fundamentals | Android Developers

10. A function literal is another name for a ___

radio_button_unchecked Function type


radio_button_checked Lambda expression Correct!
check_circle_outline

radio_button_unchecked Function reference


radio_button_unchecked Trailing lambda

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-1#quiz-/courses/quizzes/androi

Next pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-2)

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-1/android-basics-compose-unit-2-pathway-1?continue=https… 3/3
01:24 02/02/2024 Add a button to an app | Android Developers

Add a button to an app


Let's do a quick test! You must answer at least 5 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-2#quiz-/courses/quizzes/andro

1. Use a ___ Composable to display an image

radio_button_unchecked Button
radio_button_unchecked Text
radio_button_checked Image Correct!
check_circle_outline

radio_button_unchecked Icon

2. Alignment.Center centers UI components both horizontally and vertically.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

3. Composable functions can store an object in memory using the ___ composable

radio_button_checked remember Correct!


check_circle_outline

radio_button_unchecked Column
radio_button_unchecked Modifier
radio_button_unchecked @Composable

4. The debugger allows you to inspect variables when code execution has been suspended.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

5. By using ___ values in a composable function, variables can be made into observables that schedule a
recomposition when their value is changed.

radio_button_unchecked remember
radio_button_unchecked Modifier
radio_button_unchecked @Composable

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-2/android-basics-compose-unit-2-pathway-2?continue=https… 1/3
01:24 02/02/2024 Add a button to an app | Android Developers

radio_button_checked mutableStateOf Correct!


check_circle_outline

6. The ___ composable places its children in a vertical sequence.

radio_button_unchecked Row
radio_button_unchecked Box
radio_button_checked Column Correct!
check_circle_outline

radio_button_unchecked Modifier

7. The ___ debugger feature allows you to navigate back up the call stack.

radio_button_unchecked Step over


radio_button_checked Step out Correct!
check_circle_outline

radio_button_unchecked Step into


radio_button_unchecked Resume program

Results
You scored 7 out of 7. Congratulations! You have passed this quiz.

You earned the Add a button to an


app badge!
The badge has been added to your profile.

Share

link

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-2/android-basics-compose-unit-2-pathway-2?continue=https… 2/3
01:24 02/02/2024 Add a button to an app | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
2-
Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp
pathwa
y-
2/androi
d- View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source
basics-
compos
e-unit-
2-
pathwa
y-2?
continu
e=https
%3A%2
F%2Fde
veloper.
android.
com%2
Fcourse
s%2Fpa
thways
%2Fand
roid-
basics-
compos
e-unit-
2-
pathwa

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-2/android-basics-compose-unit-2-pathway-2?continue=https… 3/3
01:26 02/02/2024 Interacting with UI and state | Android Developers

Interacting with UI and state


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-3#quiz-/courses/quizzes/andro

1. Jetpack Compose runs your composables for the first time, during ___ it will keep track of the composables that
you call to describe your UI.

radio_button_checked Initial composition Correct!


check_circle_outline

radio_button_unchecked Recomposition
radio_button_unchecked State change
radio_button_unchecked App termination

2. The only way to modify a Composition is through recomposition.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

3. ___ is when Jetpack Compose re-executes the composables that may have changed in response to data changes.

radio_button_unchecked Initial composition


radio_button_checked Recomposition Correct!
check_circle_outline

radio_button_unchecked State change


radio_button_unchecked App termination

4. ___ in an application is any value that can change over time.

radio_button_checked State Correct!


check_circle_outline

radio_button_unchecked value
radio_button_unchecked valueChange
radio_button_unchecked StateValue

5. ___ is a pattern of moving state up to make a component stateless.

radio_button_unchecked State change

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-3/android-basics-compose-unit-2-pathway-3?continue=https… 1/4
01:26 02/02/2024 Interacting with UI and state | Android Developers

radio_button_checked State hoisting Correct!


check_circle_outline

radio_button_unchecked Hoist composition


radio_button_unchecked Recomposition

6. Which KeyboardAction property is used to move the focus to the next composable?

radio_button_unchecked onDone
radio_button_checked onNext Correct!
check_circle_outline

radio_button_unchecked onGo
radio_button_unchecked onSend

7. Which of the following Kotlin functions is used to round up a Double or Float?

radio_button_unchecked kotlin.math.ceilUp()
radio_button_checked kotlin.math.ceil() Correct!
check_circle_outline

radio_button_unchecked kotlin.math.roundDown()
radio_button_unchecked kotlin.math.roundUp()

8. Layout Inspector is a tool in Jetpack Compose that allows you to inspect a Compose layout inside a running app in
an emulator or physical device.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

9. UI tests are stored in the ___ directory.

radio_button_unchecked main
radio_button_checked androidTest Correct!
check_circle_outline

radio_button_unchecked test
radio_button_unchecked res

10. Local tests and UI tests should be annotated with the ___ annotation.

radio_button_unchecked @VisibleForTesting
radio_button_unchecked @Preview
radio_button_checked @Test Correct!
check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-3/android-basics-compose-unit-2-pathway-3?continue=https… 2/4
01:26 02/02/2024 Interacting with UI and state | Android Developers

radio_button_unchecked @Composable

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Interacting with UI


and state badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-3/android-basics-compose-unit-2-pathway-3?continue=https… 3/4
01:26 02/02/2024 Interacting with UI and state | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
2

https://developer.android.com/courses/quizzes/android-basics-compose-unit-2-pathway-3/android-basics-compose-unit-2-pathway-3?continue=https… 4/4
01:41 02/02/2024 More Kotlin fundamentals | Android Developers

More Kotlin fundamentals


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-3-pathway-1#quiz-/courses/quizzes/andro

1. Which of the following is a valid way to define a data class in Kotlin?

radio_button_checked data Correct!


class Person(val name: String, val age: Int)
check_circle_outline

radio_button_unchecked class Person(val name: String, val age: Int): data

radio_button_unchecked class Person(val name: String, val age: Int)

radio_button_unchecked data class Person{val name: String, val age: Int}

2. When using a sealed class, all direct subclasses must be in the same package.

radio_button_checked true Correct!


check_circle_outline

radio_button_unchecked false

3. When using generics, the generic data type goes inside ___.

radio_button_unchecked []
radio_button_unchecked {}
radio_button_unchecked ()
radio_button_checked <> Correct!
check_circle_outline

4. A(n) ___ class is useful when you have a fixed set of values.

radio_button_checked enum Correct!


check_circle_outline

radio_button_unchecked sealed
radio_button_unchecked data
radio_button_unchecked inherited

5. To create a list object that has the ability to change its size, you would call ___.

radio_button_unchecked modifiableListOf()

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-1/android-basics-compose-unit-3-pathway-1?continue=https… 1/4
01:41 02/02/2024 More Kotlin fundamentals | Android Developers

radio_button_unchecked immutableListOf()
radio_button_unchecked listOf()
radio_button_checked mutableListOf() Correct!
check_circle_outline

6. Which of the following are higher-order functions?


Choose as many answers as you see fit.

check_box map Correct!


check_circle_outline

check_box_outline_blank arrangeBy
check_box filter Correct!
check_circle_outline

check_box forEach Correct!


check_circle_outline

7. Given the following line of code, which of the following commands will print Blue ? (Hint: If you are not sure, try
running the code in the Kotlin Playground.)

val colors = listOf("Red", "Green", "Blue")

Choose as many answers as you see fit.

check_box println(colors[2]) Correct!


check_circle_outline

check_box println(colors.get(2)) Correct!


check_circle_outline

check_box_outline_blank println(colors.contains(2))
check_box_outline_blank println(colors.getOrDefaultValue(index = 2, defaultValue = 10))

8. The programming concept of a class that has only one instance is called a ___.

radio_button_unchecked Uniqueness
radio_button_checked Singleton Correct!
check_circle_outline

radio_button_unchecked Mono-object
radio_button_unchecked Lambda

9. Which of the following statements is true regarding sets and maps?

radio_button_checked A set must contain distinct values and a map’s keys must be distinct. Correct!
check_circle_outline

radio_button_unchecked A set must contain distinct values and a map’s keys can contain duplicates.
radio_button_unchecked A set can contain duplicate values and a map’s values can contain duplicate values.
radio_button_unchecked A set can contain duplicate values and a map’s keys must be distinct.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-1/android-basics-compose-unit-3-pathway-1?continue=https… 2/4
01:41 02/02/2024 More Kotlin fundamentals | Android Developers

10. If you have a variable named records , which is a collection, to determine the number of items it contains, you
can call ___.

radio_button_unchecked records.length
radio_button_unchecked records.quantity
radio_button_unchecked len(records)
radio_button_checked records.size Correct!
check_circle_outline

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the More Kotlin


fundamentals badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-1/android-basics-compose-unit-3-pathway-1?continue=https… 3/4
01:41 02/02/2024 More Kotlin fundamentals | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
3-
pathwa
y-
1/androi
d-
basics-
compos
e-unit-
3-
pathwa
y-1?

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-1/android-basics-compose-unit-3-pathway-1?continue=https… 4/4
01:43 02/02/2024 Build a scrollable list | Android Developers

Build a scrollable list


Let's do a quick test! You must answer at least 6 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-3-pathway-2#quiz-/courses/quizzes/andro

1. Adaptive launcher icons for Android apps consist of a foreground and background vector drawable.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

2. When building a UI that requires a scrolling list with a variable number of items, which Composable should you
use?

radio_button_unchecked Column
radio_button_unchecked Row
radio_button_checked LazyColumn Correct!
check_circle_outline

radio_button_unchecked Card

3. What file type is used for the launcher icon foreground and background vectors?

radio_button_unchecked .txt
radio_button_unchecked .jpg
radio_button_unchecked .png
radio_button_checked .xml Correct!
check_circle_outline

4. Which Composable should you use to create a vertically scrollable grid with an undetermined number of items?

radio_button_unchecked LazyColumn
radio_button_checked LazyVerticalGrid Correct!
check_circle_outline

radio_button_unchecked LazyHorizontalGrid
radio_button_unchecked Row

5. The Column composable is not a good option for a list of items of unknown quantity because ___.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-2/android-basics-compose-unit-3-pathway-2?continue=https… 1/3
01:43 02/02/2024 Build a scrollable list | Android Developers

radio_button_checked It can only hold a small, finite number of predefined items Correct!
check_circle_outline

radio_button_unchecked It arranges items vertically


radio_button_unchecked It provides scrolling by default without any additional code
radio_button_unchecked It can add content on demand

6. The ___ method is used to add content to a LazyColumn Composable.

radio_button_unchecked painterResource()
radio_button_unchecked Modifier.padding()
radio_button_checked items() Correct!
check_circle_outline

radio_button_unchecked onCreate()

7. Which Composable arranges items horizontally?

radio_button_unchecked Column
radio_button_unchecked Card
radio_button_unchecked Image
radio_button_checked Row Correct!
check_circle_outline

8. Which Composable arranges items vertically?

radio_button_checked Column Correct!


check_circle_outline

radio_button_unchecked Card
radio_button_unchecked Image
radio_button_unchecked Row

Results
You scored 8 out of 8. Congratulations! You have passed this quiz.

You earned the Build a scrollable


list badge!
The badge has been added to your profile.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-2/android-basics-compose-unit-3-pathway-2?continue=https… 2/3
01:43 02/02/2024 Build a scrollable list | Android Developers

Share

link
(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
3-
pathwa
y-
2/androi
d-
basics-
compos
e-unit-
3-
pathwa
y-2?
continu
e=https
%3A%2
F%2Fde
veloper. Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp
android.
com%2
Fcourse View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source
s%2Fpa
thways
%2Fand
roid-
basics-
compos
e-unit-
3-
pathwa
y-
2%23qu
iz-
%2Fcou
rses%2
Fquizze
s%2Fan
droid-
basics-
compos
e-unit-
3-
pathwa
y-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-2/android-basics-compose-unit-3-pathway-2?continue=https… 3/3
01:45 02/02/2024 Build beautiful apps | Android Developers

Build beautiful apps


Let's do a quick test! You must answer at least 9 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-3-pathway-3#quiz-/courses/quizzes/andro

1. Animations in your Android app can:

radio_button_unchecked Add visual cues about what's going on in your app.


radio_button_unchecked Add a polished look to your app.
radio_button_unchecked Help the user see what changed.
radio_button_checked All of the above. Correct!
check_circle_outline

2. Spring animation is based on:

radio_button_unchecked Start and end values over the specified duration.


radio_button_checked Damping ratio and stiffness. Correct!
check_circle_outline

radio_button_unchecked Snapshot values specified at different timestamps.


radio_button_unchecked Interpolation between two keyframe values.

3. Spring animation is a physics-based animation driven by spring force.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

4. In the Material theming, the ___ color is the color displayed most frequently across your app's screens and
components.

radio_button_checked primary Correct!


check_circle_outline

radio_button_unchecked secondary
radio_button_unchecked surface
radio_button_unchecked background

5. The following file is used to define shapes of components in Compose.

radio_button_unchecked Theme.kt

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-3/android-basics-compose-unit-3-pathway-3?continue=https… 1/4
01:45 02/02/2024 Build beautiful apps | Android Developers

radio_button_unchecked Color.kt
radio_button_checked Shape.kt Correct!
check_circle_outline

radio_button_unchecked Colors.kt

6. You can only have one @Preview composable

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

7. A hex color code starts with a pound (#) character, and is followed by six letters and/or numbers that represent the
red, green, and blue (RGB) components of that color.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

8. The ___ file is the file that holds all the information about the theme of the app which is defined through color,
shape, and typography.

radio_button_checked Theme.kt Correct!


check_circle_outline

radio_button_unchecked Color.kt
radio_button_unchecked Shape.kt
radio_button_unchecked Colors.kt

9. ___ creates contrast between the Card and the background by adding a shadow to make the app look more
realistic and visually interesting?

radio_button_checked Elevation Correct!


check_circle_outline

radio_button_unchecked Shape
radio_button_unchecked Color
radio_button_unchecked Theme

10. What are reasons that someone may use Dark Theme on their device?

radio_button_unchecked It can reduce power usage by a significant amount (depending on the device’s screen technology).
radio_button_unchecked It improves visibility for users with low vision and those who are sensitive to bright light.
radio_button_unchecked It makes it easier for anyone to use a device in a low-light environment.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-3/android-basics-compose-unit-3-pathway-3?continue=https… 2/4
01:45 02/02/2024 Build beautiful apps | Android Developers

radio_button_checked All of the above. Correct!


check_circle_outline

11. TalkBack allows a user to navigate an app using switches instead of the touchscreen.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

12. Which attribute allows TalkBack to speak a meaningful representation of an image or icon?

radio_button_unchecked elevation
radio_button_unchecked shape
radio_button_checked contentDescription Correct!
check_circle_outline

radio_button_unchecked style

Results
You scored 12 out of 12. Congratulations! You have passed this quiz.

You earned the Add theme and


animation badge!
The badge has been added to your profile.

Share

link

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-3/android-basics-compose-unit-3-pathway-3?continue=https… 3/4
01:45 02/02/2024 Build beautiful apps | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp
basics-
compos
e-unit-
3-
View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source
pathwa
y-
3/androi
d-
basics-
compos
e-unit-
3-
pathwa
y-3?
continu
e=https
%3A%2
F%2Fde
veloper.
android.
com%2
Fcourse
s%2Fpa
thways
%2Fand
roid-
basics-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-3-pathway-3/android-basics-compose-unit-3-pathway-3?continue=https… 4/4
01:49 02/02/2024 Architecture Components | Android Developers

Architecture Components
Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-4-pathway-1#quiz-/courses/quizzes/andro

1. Which method is first called when the app no longer has focus?

radio_button_checked onPause() Correct!


check_circle_outline

radio_button_unchecked onStart()
radio_button_unchecked onCreate()
radio_button_unchecked onStop()

2. After ___, the app is no longer visible on screen.

radio_button_unchecked onPause()
radio_button_unchecked onStart()
radio_button_unchecked onCreate()
radio_button_checked onStop() Correct!
check_circle_outline

3. Use ___ to write a debug message. This method takes two arguments: the log tag and the log message.

radio_button_unchecked Log.i()
radio_button_checked Log.d() Correct!
check_circle_outline

radio_button_unchecked Log.e()
radio_button_unchecked Log.w()

4. To save a value that needs to survive a configuration change, declare its variables with ___.

radio_button_unchecked MutableState{}
radio_button_checked rememberSaveable{} Correct!
check_circle_outline

radio_button_unchecked remember{}
radio_button_unchecked State Hoisting

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-1/android-basics-compose-unit-4-pathway-1?continue=https… 1/4
01:49 02/02/2024 Architecture Components | Android Developers

5. The separation of concerns design principle states that the app should be divided into classes, each with separate
responsibilities.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

6. The UI is what the user sees, while the UI state is what the app says they should see.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

7. According to the recommended app architecture, each application should have at least the following two layers:

radio_button_unchecked The domain layer and the data layer


radio_button_checked The UI layer and the data layer Correct!
check_circle_outline

radio_button_unchecked Repository layer and the UI layer


radio_button_unchecked The domain layer and the UI layer

8. StateFlow is a data-holder observable flow that emits the current and new state updates.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

9. Which of the following configurations should be added to the build.gradle file to add dependencies for the unit
test source code?

radio_button_unchecked implementation
radio_button_checked testImplementation Correct!
check_circle_outline

radio_button_unchecked debugImplementation
radio_button_unchecked androidTestImplementation

10. Unit tests are executed on an Android device or emulator.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-1/android-basics-compose-unit-4-pathway-1?continue=https… 2/4
01:49 02/02/2024 Architecture Components | Android Developers

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Architecture


Components badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-1/android-basics-compose-unit-4-pathway-1?continue=https… 3/4
01:49 02/02/2024 Architecture Components | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-1/android-basics-compose-unit-4-pathway-1?continue=https… 4/4
01:53 02/02/2024 Navigation in Jetpack Compose | Android Developers

Navigation in Jetpack Compose


Let's do a quick test! You must answer at least 8 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-4-pathway-2#quiz-/courses/quizzes/andro

1. A route is defined with a(n) ___ data type.

radio_button_unchecked @Composable function


radio_button_unchecked NavHost.Route
radio_button_checked String Correct!
check_circle_outline

radio_button_unchecked NavRoute

2. With a NavHost , you must explicitly specify a starting screen.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

3. It’s considered best practice to not pass a NavHostController to individual composables.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

4. ___ is a composable that manages which screen is displayed based on a given route.

radio_button_unchecked NavController
radio_button_unchecked NavHostController
radio_button_checked NavHost Correct!
check_circle_outline

radio_button_unchecked ComposableNavigator

5. The composable() function called in a NavHost takes which two parameters?

radio_button_unchecked Destination content and a route


radio_button_checked A route and composable content Correct!
check_circle_outline

radio_button_unchecked A path and a composable

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-2/android-basics-compose-unit-4-pathway-2?continue=https… 1/4
01:53 02/02/2024 Navigation in Jetpack Compose | Android Developers

radio_button_unchecked Composable content and an intent.

6. You can change the currently displayed route using the ___ method.

radio_button_unchecked update()
radio_button_unchecked composable()
radio_button_unchecked transition()
radio_button_checked navigate() Correct!
check_circle_outline

7. The ___ method removes one or more screens from the backstack.

radio_button_unchecked popToStartDestination()
radio_button_checked popBackStack() Correct!
check_circle_outline

radio_button_unchecked popComposable()
radio_button_unchecked popToBackStack()

8. In a multi-screen app, navigating to a new screen puts it on the bottom of the backstack.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

9. Intent ___ contain additional data passed to an Intent.

radio_button_unchecked arguments
radio_button_checked extras Correct!
check_circle_outline

radio_button_unchecked parameters
radio_button_unchecked properties

10. StateFlow is a data-holder observable flow that emits the current and new state updates.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

11. Which of the following are true about the Back and Up buttons?
Choose as many answers as you see fit.

check_box The Back button is a system button Correct!


check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-2/android-basics-compose-unit-4-pathway-2?continue=https… 2/4
01:53 02/02/2024 Navigation in Jetpack Compose | Android Developers

check_box_outline_blank The Up button is provided by the system at the bottom of the screen
check_box_outline_blank The Back button is part of the AppBar
check_box_outline_blank The Up button in the AppBar automatically navigates to the previous screen.
check_box_outline_blank The Back button only appears if you use navigation.
check_box The Up button can be shown or hidden, depending on the current screen. Correct!
check_circle_outline

Results
You scored 11 out of 11. Congratulations! You have passed this quiz.

You earned the Navigation in


Jetpack Compose badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-2/android-basics-compose-unit-4-pathway-2?continue=https… 3/4
01:53 02/02/2024 Navigation in Jetpack Compose | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
4-
pathwa
y-
2/androi
d-
basics-
compos
e-unit-
4-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-2/android-basics-compose-unit-4-pathway-2?continue=https… 4/4
01:58 02/02/2024 Adaptive layouts | Android Developers

Adaptive layouts
Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-4-pathway-3#quiz-/courses/quizzes/andro

1. The ___ composable is used to respond to the Back button, with or without a NavHost .

radio_button_unchecked BackButton
radio_button_checked BackHandler Correct!
check_circle_outline

radio_button_unchecked BackNavigator
radio_button_unchecked BackStack

2. Which of the following are true about designing for larger screens?
Choose as many answers as you see fit.

check_box Button positioning is more important on larger screen sizes. Correct!


check_circle_outline

check_box_outline_blank Usually no changes are needed to the UI layout to make the app work well for larger screen sizes.
check_box Adding another layout to the same screen removes the need to navigate between screens. Correct!
check_circle_outline

check_box Large screen layouts should avoid placing commonly used buttons in the center of the screen. Correct!
check_circle_outline

3. A ___ is a specific measurement of width or height where an app's layout should change.

radio_button_unchecked window class


radio_button_unchecked layout point
radio_button_unchecked size bucket
radio_button_checked breakpoint Correct!
check_circle_outline

4. The compact width window size class generally refers to smaller devices, such as phones in portrait mode.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

5. The ___ API makes the implementation of adaptive layouts simpler.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-3/android-basics-compose-unit-4-pathway-3?continue=https… 1/3
01:58 02/02/2024 Adaptive layouts | Android Developers

radio_button_unchecked SizeClass
radio_button_unchecked WindowSizeState
radio_button_unchecked SizeBucket
radio_button_checked WindowSizeClass Correct!
check_circle_outline

6. A navigation rail is often appropriate for ___ width layouts.

radio_button_unchecked compact
radio_button_unchecked standard
radio_button_checked medium Correct!
check_circle_outline

radio_button_unchecked expanded

7. When building apps with adaptive layouts, you should use a single preview for each screen.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

8. The list-detail layout requires Back navigation on compact screens, but not on screens where both the list and
detail screens are shown at once.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

9. Assume you have a contacts app that displays a list of contacts and has details to show for each contact. What are
appropriate ways to adapt the UI to different screen sizes?

radio_button_checked Use the list-detail layout to show one pane or two panes side-by-side depending on the available width of the screen. Correct!
check_circle_outline

radio_button_unchecked The list items should take up the full width of the screen, regardless of how narrow or wide the screen is.
radio_button_unchecked The Up button should always be shown within the app and clicking the button should exit the app.
radio_button_unchecked When rotating the device, the selected item in the list (and the corresponding details of that item shown) should be reset to the first item in the list.
radio_button_unchecked It’s required to use the Jetpack Navigation Component to make the UI responsive to different screen sizes.

10. Tests can be configured to run only test functions with custom annotations by configuring the ___.

radio_button_unchecked module
radio_button_unchecked package

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-3/android-basics-compose-unit-4-pathway-3?continue=https… 2/3
01:58 02/02/2024 Adaptive layouts | Android Developers

radio_button_unchecked instrumentation class


radio_button_checked instrumentation arguments Correct!
check_circle_outline

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-4-pathway-3#quiz-/courses/quizzes/andro

Next pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-5-pathway-1)

https://developer.android.com/courses/quizzes/android-basics-compose-unit-4-pathway-3/android-basics-compose-unit-4-pathway-3?continue=https… 3/3
02:02 02/02/2024 Get data from the internet | Android Developers

Get data from the internet


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-5-pathway-1#quiz-/courses/quizzes/andro

1. With concurrent programming, code might execute in an order different from how it was written.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

2. Fill-in-the-blanks
Enter one or more words to complete the sentence.

The BackHandler composable is used to respond to the Back button, with or without a NavHost.

Incorrect.
not_interested

3. Which of the following statements are true about coroutine contexts?


Choose as many answers as you see fit.

check_box_outline_blank Dispatchers.Default is the best choice for long running tasks involving reading and writing large amounts of data.
check_box Dispatchers.Main can be used for updating the UI but not for long-running tasks. Correct!
check_circle_outline

check_box A Job controls the lifecycle of a coroutine. Correct!


check_circle_outline

check_box Dispatchers.IO is optimized for network I/O, among other background tasks. Correct!
check_circle_outline

4. launch() and async() are extension functions of a ___, which keeps track of any coroutines it creates.

radio_button_checked CoroutineScope Correct!


check_circle_outline

radio_button_unchecked Job
radio_button_unchecked Dispatcher
radio_button_unchecked CoroutineContext

5. Which of the following statements are true about structured concurrency and its best practices?
Choose as many answers as you see fit.

check_box If a coroutine is canceled, child coroutines should also be canceled. Correct!


check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-1/android-basics-compose-unit-5-pathway-1?continue=https… 1/3
02:02 02/02/2024 Get data from the internet | Android Developers

check_box_outline_blank A parent scope can complete before one or more of its children are completed.
check_box_outline_blank A failure should propagate downward without canceling the parent coroutine.
check_box Coroutines must be launched from a coroutine scope. Correct!
check_circle_outline

6. Which of the following statements are true about web services?


Choose as many answers as you see fit.

check_box GET, POST, and DELETE are all examples of HTTP operations. Correct!
check_circle_outline

check_box A URL is a type of URI but not all URIs are URLs. Correct!
check_circle_outline

check_box_outline_blank RESTful services always provide a formatted XML response.


check_box_outline_blank Retrofit is a third-party library for handling JSON from a web service.

7. Retrofit is a third-party library that enables your app to make requests to a(n) ___ web service.

radio_button_unchecked XML
radio_button_unchecked Socket
radio_button_checked RESTful Correct!
check_circle_outline

radio_button_unchecked JSON

8. One recommended way to perform a Retrofit network request is with a coroutine launched in the
viewModelScope .

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

9. To enable your app to make connections to the Internet, add the ' android.permission.INTERNET ' permission in
the ___ file.

radio_button_unchecked MainActivity
radio_button_unchecked build.gradle
radio_button_checked Android manifest Correct!
check_circle_outline

radio_button_unchecked ViewModel

10. The process of turning a JSON result into usable data, as is done with Gson, is called JSON ___.

radio_button_unchecked Serialization

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-1/android-basics-compose-unit-5-pathway-1?continue=https… 2/3
02:02 02/02/2024 Get data from the internet | Android Developers

radio_button_unchecked Encoding
radio_button_unchecked Converting
radio_button_checked Parsing Correct!
check_circle_outline

Results
You scored 9 out of 10. Congratulations! You have passed this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-5-pathway-1#quiz-/courses/quizzes/androi

Next pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-5-pathway-2)

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-1/android-basics-compose-unit-5-pathway-1?continue=https… 3/3
02:03 02/02/2024 Load and display images from the internet | Android Developers

Load and display images from the internet


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-5-pathway-2#quiz-/courses/quizzes/andro

1. Which of the following is not a common HTTP operation/method:

radio_button_unchecked GET
radio_button_unchecked POST
radio_button_unchecked DELETE
radio_button_checked SET Correct!
check_circle_outline

2. The response from a REST web service is commonly formatted in one of the common data transfer formats like
XML or JSON.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

3. Which of the following is not true for the Retrofit library:

radio_button_unchecked It is a client library.


radio_button_unchecked It enables your app to make requests to a REST web service.
radio_button_checked It converts Kotlin objects to JSON objects. Correct!
check_circle_outline

radio_button_unchecked It is a third-party library.

4. Which of the following applies to a Singleton pattern:

radio_button_unchecked object declarations are used to declare singleton objects in Kotlin.


radio_button_unchecked Ensures that one, and only one, instance of an object is created
radio_button_unchecked Has one global point of access to that object.
radio_button_checked All of the above Correct!
check_circle_outline

5. Each JSON object contains the following:

radio_button_unchecked A set of key-value pairs separated by a colon.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-2/android-basics-compose-unit-5-pathway-2?continue=https… 1/4
02:03 02/02/2024 Load and display images from the internet | Android Developers

radio_button_checked A set of key-value pairs separated by a comma. Correct!


check_circle_outline

radio_button_unchecked A set of key-value pairs separated by a semi colon.


radio_button_unchecked None of the above

6. Following Android’s recommended app architecture guidelines, an app should have which of the following:

radio_button_unchecked A UI Layer
radio_button_unchecked A Domain Layer
radio_button_checked A Data Layer Correct!
check_circle_outline

radio_button_unchecked A Business Layer

7. The advantages of using Dependency Injection (DI) in your app include which of the following:
Choose as many answers as you see fit.

check_box Helps with the reusability of code Correct!


check_circle_outline

check_box Makes refactoring easier Correct!


check_circle_outline

check_box Helps with testing Correct!


check_circle_outline

check_box_outline_blank Makes your app run faster

8. If your app has more than one type of data source, they should all be stored in the same repository for ease of use.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

9. Which of the following is used to replace the Main dispatcher with a TestDispatcher in a local unit test:

radio_button_unchecked runTest
radio_button_unchecked runBlocking
radio_button_unchecked Distpatchers.resetMain()
radio_button_checked Dispatchers.setMain() Correct!
check_circle_outline

10. The runTest() function can be used to test suspend functions.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-2/android-basics-compose-unit-5-pathway-2?continue=https… 2/4
02:03 02/02/2024 Load and display images from the internet | Android Developers

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Load and display


images from the internet badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-2/android-basics-compose-unit-5-pathway-2?continue=https… 3/4
02:03 02/02/2024 Load and display images from the internet | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr

https://developer.android.com/courses/quizzes/android-basics-compose-unit-5-pathway-2/android-basics-compose-unit-5-pathway-2?continue=https… 4/4
02:06 02/02/2024 Introduction to SQL | Android Developers

Introduction to SQL
Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-6-pathway-1#quiz-/courses/quizzes/andro

1. Which of the following statements are true about relational databases and SQLite?
Choose as many answers as you see fit.

check_box Referencing one table's primary key in another table lets you model relationships between tables. Correct!
check_circle_outline

check_box_outline_blank A SQLite database consists of columns, which consist of tables and rows.
check_box_outline_blank Every data table must have at least one foreign key.
check_box Rows contain the individual items in the database. Correct!
check_circle_outline

2. It is optional to end a SQL statement with a semicolon.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

3. If you want to calculate the sum of all values for a database column, what do you use?

radio_button_checked Aggregate function Correct!


check_circle_outline

radio_button_unchecked WHERE clause

radio_button_unchecked DISTINCT keyword


radio_button_unchecked LIMIT clause

4. Which SELECT statement returns the number of unique email addresses for messages in the spam folder?

radio_button_unchecked SELECT COUNT(DISTINCT folder) FROM email WHERE spam != sender;

radio_button_unchecked SELECT DISTINCT COUNT(sender) FROM email WHERE folder = 'spam';

radio_button_checked SELECT Correct!


COUNT(DISTINCT sender) FROM email WHERE folder = 'spam';
check_circle_outline

radio_button_unchecked SELECT DISTINCT COUNT('spam') FROM email WHERE sender = folder;

5. The SQL statement SELECT * FROM contacts WHERE name LIKE '%Milton' returns all rows where the value of
the name column begins with Milton .

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-1/android-basics-compose-unit-6-pathway-1?continue=https… 1/4
02:06 02/02/2024 Introduction to SQL | Android Developers

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

6. Which of the following statements are true about GROUP BY and ORDER BY ?
Choose as many answers as you see fit.

check_box_outline_blank The ORDER BY clause comes before the GROUP BY clause.

check_box In an ORDER Correct!


BY clause, descending order is the default.
check_circle_outline

check_box_outline_blank If a query contains a GROUP BY clause, it overrides the ORDER BY clause.

check_box ORDER Correct!


BY and GROUP BY clauses can both accept multiple columns.
check_circle_outline

7. The WHERE condition NOT read = false and the WHERE condition read != true are equivalent.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

8. The LIMIT clause LIMIT 30 SKIP 60 returns:

radio_button_unchecked 60 rows
radio_button_unchecked Rows 31 through 60
radio_button_checked Rows 61 through 90 Correct!
check_circle_outline

radio_button_unchecked 90 rows

9. An UPDATE statement uses a ___ clause to assign values for columns.

radio_button_unchecked WHERE
radio_button_checked SET Correct!
check_circle_outline

radio_button_unchecked ASSIGN
radio_button_unchecked LIKE

10. UPDATE and DELETE statements can include a WHERE clause and can affect multiple rows.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-1/android-basics-compose-unit-6-pathway-1?continue=https… 2/4
02:06 02/02/2024 Introduction to SQL | Android Developers

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Introduction to


SQL badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-1/android-basics-compose-unit-6-pathway-1?continue=https… 3/4
02:06 02/02/2024 Introduction to SQL | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-1/android-basics-compose-unit-6-pathway-1?continue=https… 4/4
02:11 02/02/2024 Use Room for data persistence | Android Developers

Use Room for data persistence


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-6-pathway-2?authuser=1#quiz-/courses/q

1. Which of the following statements is not true about the @Query annotation?

radio_button_unchecked The @Query annotation is used with a method in the DAO.


radio_button_unchecked The @Query annotation corresponds to a SELECT query.
radio_button_unchecked The @Query annotation can pass arguments into a SQL statement by preceding their name with a colon.
radio_button_checked The @Query annotation can only be used with a suspend function. Correct!
check_circle_outline

2. Which of the following statements are true about the DAO?

radio_button_unchecked DAO functions use annotations like @Insert and @Update that correspond to an operation on the database.
radio_button_unchecked DAO functions can return a flow.
radio_button_unchecked Instances of DAO classes are referenced in the AppDatabase class.
radio_button_checked All of the above Correct!
check_circle_outline

3. The Database class, inheriting from the RoomDatabase class, is responsible for ___.

radio_button_checked Instantiating the database and providing access to the DAO. Correct!
check_circle_outline

radio_button_unchecked Representing individual data tables.


radio_button_unchecked Defining functions that map to SQL statements, such as SELECT queries.
radio_button_unchecked Provides data to the UI.

4. The purpose of the DAO is to:

radio_button_unchecked Hold reference to the view models and the database.


radio_button_checked Define functions that map to SQL statements, such as SELECT , and INSERT queries. Correct!
check_circle_outline

radio_button_unchecked Provide a factory method to create a database instance.


radio_button_unchecked Create a new database instance.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-2/android-basics-compose-unit-6-pathway-2?authuser=1&con… 1/4
02:11 02/02/2024 Use Room for data persistence | Android Developers

5. Why do you need to use the synchronized() function when you create the database?
Choose as many answers as you see fit.

check_box_outline_blank It lets you create multiple copies of the database.


check_box It lets you safely access the code from multiple threads at once. Correct!
check_circle_outline

check_box It is used to avoid race conditions. Correct!


check_circle_outline

check_box It ensures only one thread can enter the block of code at once. Correct!
check_circle_outline

6. You can use the @Insert and @Delete annotations without providing a SQL statement.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

7. Fill-in-the-blanks
Enter one or more words to complete the sentence.

To handle conflicts when inserting into a database, you can pass a(n) OnConflictStrategy parameter, such as IGNORE, to the @Insert
annotation.

Incorrect.
not_interested

8. Select all the statements that are true about the Database Inspector:
Choose as many answers as you see fit.

check_box It lets you inspect, query, and modify your app's databases while your app is running. Correct!
check_circle_outline

check_box_outline_blank It works with other SQLite libraries that you bundle with your app.
check_box It is especially useful for database debugging. Correct!
check_circle_outline

check_box It works with plain SQLite and with libraries built on top of SQLite, such as Room. Correct!
check_circle_outline

9. Entities represent individual data tables in the Room database.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

10. Which of the following statement is not true about the primary key:

radio_button_unchecked You can use the primary key to uniquely identify every record/entry in your database tables.
radio_button_unchecked After you assign the primary key, you cannot modify it.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-2/android-basics-compose-unit-6-pathway-2?authuser=1&con… 2/4
02:11 02/02/2024 Use Room for data persistence | Android Developers

radio_button_checked Room generates an incrementing primary key value for each entity by default. Correct!
check_circle_outline

radio_button_unchecked The primary key represents the entity object as long as it exists in the database.

Results
You scored 9 out of 10. Congratulations! You have passed this quiz.

You earned the Use Room for data


persistence badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?authuser=1&

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-2/android-basics-compose-unit-6-pathway-2?authuser=1&con… 3/4
02:11 02/02/2024 Use Room for data persistence | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
6-
pathwa
y-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-2/android-basics-compose-unit-6-pathway-2?authuser=1&con… 4/4
02:12 02/02/2024 Store and access data using keys with DataStore | Android Developers

Store and access data using keys with DataStore


Let's do a quick test! You must answer at least 4 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-6-pathway-3#quiz-/courses/quizzes/andro

1. The implementations of DataStore are:


Choose as many answers as you see fit.

check_box Proto Correct!


check_circle_outline

check_box Preferences Correct!


check_circle_outline

check_box_outline_blank Room
check_box_outline_blank SQLite

2. The Preferences DataStore uses a predefined schema.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

3. Which function does DataStore provide to modify the DataStore?

radio_button_unchecked preferencesDataStore()
radio_button_unchecked updatePreferences()
radio_button_checked edit() Correct!
check_circle_outline

radio_button_unchecked map()

4. Preferences DataStore uses keys to access stored values.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

5. Which exception can occur when you attempt to read from a Preferences DataStore?

radio_button_unchecked IllegalArgumentException
radio_button_checked IOException Correct!
check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-3/android-basics-compose-unit-6-pathway-3?continue=https… 1/3
02:12 02/02/2024 Store and access data using keys with DataStore | Android Developers

radio_button_unchecked IllegalStateException
radio_button_unchecked NumberFormatException

Results
You scored 5 out of 5. Congratulations! You have passed this quiz.

You earned the Store and access


data using keys with DataStore ke y value

badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-3/android-basics-compose-unit-6-pathway-3?continue=https… 2/3
02:12 02/02/2024 Store and access data using keys with DataStore | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
6-
pathwa

https://developer.android.com/courses/quizzes/android-basics-compose-unit-6-pathway-3/android-basics-compose-unit-6-pathway-3?continue=https… 3/3
02:16 02/02/2024 Schedule tasks with WorkManager | Android Developers

Schedule tasks with WorkManager


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-7-pathway-1#quiz-/courses/quizzes/andro

1. Which tool helps you visualize, monitor, and debug your app's workers?

radio_button_unchecked Profiler
radio_button_checked Background Task Inspector Correct!
check_circle_outline

radio_button_unchecked Logcat
radio_button_unchecked Device Manager

2. Which of the following options are valid terminal work states?


Choose as many answers as you see fit.

check_box CANCELLED Correct!


check_circle_outline

check_box_outline_blank DELETED
check_box FAILED Correct!
check_circle_outline

check_box SUCCEEDED Correct!


check_circle_outline

3. Which of the following options are valid types of work requests?


Choose as many answers as you see fit.

check_box OneTimeWorkRequest Correct!


check_circle_outline

check_box_outline_blank SingleWorkRequest
check_box_outline_blank RepeatingWorkRequest
check_box PeriodicWorkRequest Correct!
check_circle_outline

4. Creating and enqueueing multiple dependent tasks and the order they should run in is called linking.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

https://developer.android.com/courses/quizzes/android-basics-compose-unit-7-pathway-1/android-basics-compose-unit-7-pathway-1?continue=https… 1/4
02:16 02/02/2024 Schedule tasks with WorkManager | Android Developers

5. Work constraints are useful in which of the following situations?

radio_button_unchecked Checking that a valid form of payment is saved on the user’s device before the work runs.
radio_button_unchecked Checking what time it is before the work runs.
radio_button_checked Checking that the device is connected to a wifi network before downloading a large amount of app data. Correct!
check_circle_outline

radio_button_unchecked Checking that the app was opened a set number of times before the work runs.

6. Which of the following options is a way to pass input data to a worker?

radio_button_unchecked Pass the data in as an argument when calling the doWork() function.
radio_button_checked Use a Data object to pass key/value pairs. Correct!
check_circle_outline

radio_button_unchecked Pass data as a String, but it must be less than 140 characters.
radio_button_unchecked Assign it to the worker.inputData variable.

7. After work is enqueued, you can check its status by ___.


Choose as many answers as you see fit.

check_box Name Correct!


check_circle_outline

check_box Id Correct!
check_circle_outline

check_box Tag Correct!


check_circle_outline

check_box_outline_blank Work type

8. The Background Task Inspector lets you stop workers during their execution.

radio_button_unchecked True
radio_button_checked False Correct!
check_circle_outline

9. Which worker builder is recommended to test CoroutineWorker s?

radio_button_unchecked OneTimeWorkRequestBuilder
radio_button_unchecked PeriodicWorkRequestBuilder
radio_button_unchecked TestWorkerBuilder
radio_button_checked TestListenableWorkerBuilder Correct!
check_circle_outline

10. When testing worker implementations, you can call workers directly with doWork() instead of enqueuing the
worker.

https://developer.android.com/courses/quizzes/android-basics-compose-unit-7-pathway-1/android-basics-compose-unit-7-pathway-1?continue=https… 2/4
02:16 02/02/2024 Schedule tasks with WorkManager | Android Developers

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Schedule tasks


with WorkManager badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-7-pathway-1/android-basics-compose-unit-7-pathway-1?continue=https… 3/4
02:16 02/02/2024 Schedule tasks with WorkManager | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
7-
pathwa
y-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-7-pathway-1/android-basics-compose-unit-7-pathway-1?continue=https… 4/4
02:23 02/02/2024 Android Views and Compose in Views | Android Developers

Android Views and Compose in Views


Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-8-pathway-1#quiz-/courses/quizzes/andro

1. Which language is used to build View layouts?

radio_button_unchecked HTML
radio_button_unchecked Kotlin
radio_button_checked XML Correct!
check_circle_outline

radio_button_unchecked Java

2. When building an app with Views, the concept of a Composable 'screen' should be replaced by which of the
following?

radio_button_checked Fragment Correct!


check_circle_outline

radio_button_unchecked ViewModel
radio_button_unchecked Composable
radio_button_unchecked Activity

3. View Bindings are used to access and interact with XML declared View s.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

4. In which Fragment lifecycle method is the View Binding inflated?

radio_button_unchecked onViewCreated()
radio_button_checked onCreateView() Correct!
check_circle_outline

radio_button_unchecked onStart()
radio_button_unchecked onResume()

5. View components can be accessed before the View Binding has been inflated.

radio_button_unchecked True

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-1/android-basics-compose-unit-8-pathway-1?continue=https… 1/4
02:23 02/02/2024 Android Views and Compose in Views | Android Developers

radio_button_checked False Correct!


check_circle_outline

6. A ComposeView is a(n):

radio_button_unchecked View that can host an Android View inside a Compose UI.
radio_button_checked Android view that can host Jetpack Compose UI content inside a View layout Correct!
check_circle_outline

radio_button_unchecked Android view that can host an Android View inside a View layout.
radio_button_unchecked View that can host Compose UI inside a Compose UI.

7. Jetpack Compose and the View system can co-exist in your codebase.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

8. The ComposeView uses its ___ method to display Compose elements on the screen.

radio_button_unchecked Composable()
radio_button_checked setContent() Correct!
check_circle_outline

radio_button_unchecked setComposeContent()
radio_button_unchecked displayComposable()

9. Jetpack Compose was designed with View interoperability right from the start.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

10. The flag that enables Android Studio to work with Compose is the:

radio_button_unchecked In project-level use buildFeatures { compose true }

radio_button_checked In app-level use buildFeatures Correct!


{ compose true }
check_circle_outline

radio_button_unchecked In project-level use buildFeatures { enableCompose true }

radio_button_unchecked In app-level use buildFeatures { enableCompose true }

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-1/android-basics-compose-unit-8-pathway-1?continue=https… 2/4
02:23 02/02/2024 Android Views and Compose in Views | Android Developers

Results
You scored 10 out of 10. Congratulations! You have passed this quiz.

You earned the Android Views


and Compose in Views badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-1/android-basics-compose-unit-8-pathway-1?continue=https… 3/4
02:23 02/02/2024 Android Views and Compose in Views | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-1/android-basics-compose-unit-8-pathway-1?continue=https… 4/4
02:24 02/02/2024 Views in Compose | Android Developers

Views in Compose
Let's do a quick test! You must answer at least 4 questions correctly to pass this quiz.

Return to pathway (https://developer.android.com/courses/pathways/android-basics-compose-unit-8-pathway-2#quiz-/courses/quizzes/andro

1. Which Composable is used to implement a View Interop?

radio_button_unchecked InputRow
radio_button_unchecked Column
radio_button_unchecked TextInputRow
radio_button_checked AndroidView Correct!
check_circle_outline

2. What is an AndroidView ?

radio_button_checked A Composable that hosts a View element or hierarchy Correct!


check_circle_outline

radio_button_unchecked An Android View that hosts Jetpack Compose UI content inside a View layout
radio_button_unchecked An Android View that hosts an Android View inside a View layout
radio_button_unchecked A Compose View that hosts Jetpack Compose UI content inside a Compose UI

3. Which of the following are parameters of the AndroidView Composable? Select all that apply.
Choose as many answers as you see fit.

check_box factory Correct!


check_circle_outline

check_box_outline_blank inputLabel
check_box update Correct!
check_circle_outline

check_box modifier Correct!


check_circle_outline

4. The update callback of the AndroidView Composable is called after the corresponding View is inflated.

radio_button_checked True Correct!


check_circle_outline

radio_button_unchecked False

5. What is the function of the factory lambda of the AndroidView Composable?

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-2/android-basics-compose-unit-8-pathway-2?continue=https… 1/3
02:24 02/02/2024 Views in Compose | Android Developers

radio_button_unchecked Decorates and augments the AndroidView Composable


radio_button_unchecked Executes code after the View is inflated
radio_button_checked Creates the View Correct!
check_circle_outline

Results
You scored 5 out of 5. Congratulations! You have passed this quiz.

You earned the Views in Compose


badge!
The badge has been added to your profile.

Share

link

Return to pathway (https://developer.android.com/courses/pathways/android-basics-comp

View profile (https://developers.google.com/profile/u/105937894638304689837?utm_source

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-2/android-basics-compose-unit-8-pathway-2?continue=https… 2/3
02:24 02/02/2024 Views in Compose | Android Developers

(https:/
/develo
per.and
roid.co
m/cours
es/quizz
es/andr
oid-
basics-
compos
e-unit-
8-
pathwa
y-
2/androi
d-

https://developer.android.com/courses/quizzes/android-basics-compose-unit-8-pathway-2/android-basics-compose-unit-8-pathway-2?continue=https… 3/3

You might also like