COURSE 5: CREATE THE USER INTERFACE IN ANDROID STUDIO QUIZ ANSWERS
Week 4: UI Styling
Meta Android Developer Professional Certificate
Complete Coursera Answers & Study Guide
Enroll in Coursera Meta Android Developer Professional Certification
UI Styling INTRODUCTION
In this module, you will be assessed on the key skills covered in the Course.
Learning Objectives
- Define, apply, and customize themes
- Animate UI elements by applying transitions and constraints
SELF-REVIEW: DEFINING RESOURCES AND THEMES
1. When defining the color resource in the exercise, what class was used?
- Color (CORRECT)
- ColorYellow
- ColorCompose
That’s correct! Jetpack provides a built-in Color class to work with colors.
2. What was the size of the order button?
- 200 sp
- The Text size was derived from size of the text. (CORRECT)
- 200 dp
Correct! The Text size was derived from size of the text by using wrap content.
3. Which Theme color was modified?
- primary (CORRECT)
- secondary
- tertiary
Correct! The primary theme color was modified. By default, the button background color is derived from primary Theme color.
4. Themes allow you to separate application design details from the UI structure and behavior.
- True (CORRECT)
- False
That is correct. With themes you can separate application design details from the UI structure and behavior.
5. In Android, colors are represented as hexadecimal ARGB values.
- True (CORRECT)
- False
The AGRB acronym stands for Alpha, Red, Green and Blue.
6. When styling text, you are limited as to the number of styles you can apply so they won’t interfere with one another.
- True
- False (CORRECT)
Correct. When styling text, you can use as many options as you like. They all work together to produce the desired result.
7. The theme helps to create a custom design according to the product’s brand and it also helps to customize and unify the design of UI elements.
- True (CORRECT)
- False
That’s correct. The theme helps to create a custom design according to the product’s brand and it also helps to customize and unify the design of UI elements.
KNOWLEDGE CHECK: THEMES
1. Theme is represented as a collection of attributes.
- True (CORRECT)
- False
Correct! Theme is represented as a collection of attributes such as color, button heigh or text size.
2. Modifying Button style in the theme will not change appearance of every button in the application unless theme style is overridden.
- True
- False (CORRECT)
Correct! Theme change will be applied to every screen in the application. For example, a new background color for a Button will be applied to all buttons in every application screen.
3. Select all that apply.
The Button height defined in app Theme can be overridden in__________:
- Android Manifest
- Button composable (CORRECT)
- Button Style (CORRECT)
Correct! The Theme button height attribute will be overridden by attribute defined in composable.
Correct! The Theme button height attribute will be overridden by attribute defined in button style.
4. What do these two characters of hexadecimal ARGB color represent?

- Value of blue color
- Value of red color (CORRECT)
- Value of alpha channel
- Value of green color
Correct! This bit represents a red color value from ARGB color representation.

5. The Decimal numeric system is used to represent Android color resources.
- False (CORRECT)
- True
Correct! The Hexidecimal numeric system is used to represent android color resources
6. Which unit would you use to set text size?
- sp (scalable pixel) (CORRECT)
- dp (density independent pixel)
- both sp and dp can be used
Correct! Unlike the width and height of other composables which are set in density independent pixel, or dp, the text size is set in scalable pixel, also known as sp.
Text(
text = "My Text",
fontSize = 26.sp,
)
7. Which arguments of text can be provided using Text composable? Select all that apply.
- font color (CORRECT)
- font weight (CORRECT)
- font size (CORRECT)
- letter spacing (CORRECT)
Correct! Text composable allows to provide font color.
Correct! Text composable allows to provide font weight.
Correct! Text composable allows to provide font size.
Correct! Text composable allows to provide letter spacing.
8. The White color is represented by __________- value in the ARGB color space.
- FF000000
- FFFFFFFF (CORRECT)
- 0x00000000
- 00FF0000
Correct! This hexadecimal value represents a white color. The F means maximum value for each color.
SELF-REVIEW: ANIMATING COMPOSABLES
1. What is the name of the composable used to add text visibility animations?
- visible
- Visibility
- AnimatedVisibility (CORRECT)
That’s correct. The AnimatedVisibility composable is used to add text visibility animations.
2. What is the name of the enter transition that was added to the text?
- fade out
- slide in
- fade in (CORRECT)
That’s correct. Fade in transition was used to show the text gradually over time.
3. remember delegate preserves visible variable state during recomposition.
- True (CORRECT)
- False
That’s correct. The remember delegate helps to preserve visible variable value after each resomposition. Without remember delegate the visible variable value would be rested after each recomposition.
4. The Animated Visibility API animates the _______________ of its content. Check all that apply.
- appearance (CORRECT)
- disappearance (CORRECT)
- duration
That’s right! This API animates the appearance of its content.
Correct! This API animates the disappearance of its content.
5. In this video, the function used for the animation is animateFloatAsState().
- True (CORRECT)
- False
Correct. The function used for the animation is animateFloatAsState().
Coursera Meta Android Developer Professional Certificate Answers and Study Guide
Liking our content? Then don’t forget to ad us to your bookmarks so you can find us easily!
Weekly Breakdown | Meta Study Guides | Back to Top
MODULE QUIZ: ANIMATIONS
1. Theme is represented as a ________ .
- collection of attributes (CORRECT)
- collection of composables
- collection of views
Correct! There is represented by attributes such as height and color.
2. The black color is represented by __________ value in the ARGB color space.
- 00FF0000
- FFFFFFFF
- FF000000
- 0xFF000000 (CORRECT)
Correct! This hexadecimal value represents a black color. The 0 means that it is a minimum value for each color, so 000000 means black. However, the first two FF characters represent the alpha channel where the maximum value is required to make the color fully opaque.
3. The main difference between dp (density independent pixel) and sp (scalable pixel) is that it takes the text size setting of the user device into consideration when deciding what text size should be displayed.
- True (CORRECT)
- False
Correct! The user may modify this setting in the Android system preferences, and the text size is scaled accordingly in the application.
4. What will the output of this code be?

- The letter H has black color and text “ello” has black color.
- The letter “H” has blue color and text “ello” has black color. (CORRECT)
- The letter “H” has blue color and text “ello” has blue color.
- The letter “H” has black color and text “ello” has blue color.
Correct! Style such as color can be applied to parts of the text including individual letters.
5. What will be displayed on the screen?

- The screen will be red.
- Part of the screen will be red.
- A red square of size 100 dp.
- Nothing will happen. (CORRECT)
Correct! Surface is not visible on the screen because by default, the surface has a width and heigh of zero.
6. Which arguments of text can be provided using the Text composable? Select all that apply.
- Font color (CORRECT)
- Font weight (CORRECT)
- Font size (CORRECT)
- Letter spacing (CORRECT)
Correct! Text composable allows to provide font color.
Correct! Text composable allows to provide font weight.
Correct! Text composable allows to provide font size.
Correct! Text composable allows to provide letter spacing.
7. Is it possible to change the shape of surface corners?
- Yes (CORRECT)
- No
Correct! By default, the surface has a rectangular shape. You can modify the shape of the surface by adding the shape parameter.
8. The ___________________ composable animates the appearance and disappearance of its content.
- VisibleAnimation
- Visibility
- AnimatedVisibility (CORRECT)
- Animation
Correct! The AnimatedVisibility composable smooths out Text transition from one state to another, from the component being visible to invisible and vice versa.
9. What will the output of this code be?

var visible by remember {
mutableStateOf(value: true)
}
Column { this: ColumnScope
AnimatedVisibility(visible = visible) { this: AnimatedVisibilityScope
Text(text = "Hello, world!")
}
Button(onClick = { visible = !visible }) { this: RowScope
Text( text: "Button ")
}
}
- The first Button click will instantly hide the Text and the following Button click will instantly show the Text.
- The First Button click will start fade in animation of the Text and the following Button click will start fade out animation of the Text.
- The first Button click will instantly show the Text and the following Button click will have no effect.
- The first Button click will start the fade out animation of the Text and the following Button click will start fade in animation of the Text. (CORRECT)
Correct! The Animated Visibility composable smooths out the Text transition from one state to another, from the component being visible to invisible and vice versa.
10. You can control how long each transition will last.
- Yes (CORRECT)
- No
Correct! Animation duration can be controlled by providing an animation spec parameter to the transition.
Interactive CSS CONCLUSION
To be written
Subscribe to our site
Get new content delivered directly to your inbox.
Quiztudy Top Courses
Popular in Coursera
- Meta Marketing Analytics Professional Certificate.
- Google Digital Marketing & E-commerce Professional Certificate.
- Google UX Design Professional Certificate.
- Meta Social Media Marketing Professional Certificate
- Google Project Management Professional Certificate
- Meta Front-End Developer Professional Certificate
Liking our content? Then, don’t forget to ad us to your BOOKMARKS so you can find us easily!