05 November 2022

ANDROID BASICS WITH COMPOSE

Adapt for different screen sizes

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

2.     

Which of the following are true about designing for larger screens?

Choose as many answers as you see fit.

Partially Correct.

Correct!

Correct!

Correct!

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

4.     

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

Correct!

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

6.     

A navigation rail is often appropriate for ___ width layouts.

7.     

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

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.

Correct!

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?

Correct!

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

 

Bottom of Form

 

04 November 2022

ANDROID BASICS WITH COMPOSE

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

Correct!

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

Correct!

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

Correct!

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

5.     

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

Correct!

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

7.     

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

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

Incorrect.

9.     

Intent ___ contain additional data passed to an Intent.

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

Correct!

11.  Which of the following are true about the Back and Up buttons?

Choose as many answers as you see fit.

Partially Correct.

Correct!

Correct!

03 November 2022

ANDROID BASICS WITH COMPOSE

Architecture Components 


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

onPause()

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

onStop()

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

Log.d()

Correct!

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

rememberSaveable{}

State Hoisting

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

True

Correct!

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

True

Correct!

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

The UI layer and the data layer

Correct!

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

True

Correct!

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

testImplementation

Correct!

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

False

02 November 2022

ANDROID BASICS WITH COMPOSE

 

Build beautiful apps

 

1.      Animations in your Android app can:

All of the above.

Correct!

2.      Spring animation is based on:

Start and end values over the specified duration.

Damping ratio and stiffness.

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

True

Correct!

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

primary

secondary

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

Shape.kt

Correct!

6.      You can only have one @Preview composable

False

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.

True

Correct!

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.

Theme.kt

Correct!

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

Elevation

Correct!

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

It makes it easier for anyone to use a device in a low-light environment.

All of the above.

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

False

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

contentDescription

Correct!

 

#QUIZ Faktor bentuk

  Faktor bentuk Class ukuran jendela ditentukan oleh seluruh layar fisik untuk multitasking atau segmentasi lainnya. Benar Salah Class ukura...