Get user input in an app Return to pathway Which of the following is true about class inheritance? Class inheritance lets you reuse code and makes your program easier to maintain. Properties and functions of the parent class(es) are available to the child class. You can define additional properties and functions that are specific to subclasses. You can override parent class members in subclasses. All of the above Which of the following are true about abstract classes? Choose as many answers as you see fit. They can be extended by subclasses and implementations can be provided for abstract members of the class. They have an implementation for all of their properties and functions. They may have abstract properties or abstract functions. They can be instantiated. They are not fully implemented and cannot be instantiated. They need to be marked with the open keyword to be extended. Fill-in-the-blanks Enter one or more words to complete the sentence. The ___ is called when you create an instance of a class. How do you mark a property to be used only inside its current class? Use the override keyword. Use the val keyword. Use the private keyword. Use the closed keyword. It is not possible to do this. Select all answers that are true for this XML layout when displayed on the screen. (You can sketch this out on a piece of paper first, if that helps.) <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/textViewA" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="A" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/textViewB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="B" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> Choose as many answers as you see fit. TextView A appears vertically stacked on top of TextView B. The starting edge of TextView A is aligned to the starting edge of the parent view. The starting edge of TextView B is aligned to the starting edge of the parent view. TextView B is horizontally and vertically centered within the parent. The tops of TextView A and TextView B are aligned to top of the parent view. The width of TextView A matches the width of the parent ConstraintLayout. Which line(s) of XML code will produce an error? 1 <TextView 2 android:layout_width="wrap_content" 3 android:layout_height"wrap_content" 4 android:padding="8dp" 5 android:text="@string/title" 6 android:textSize=18sp /> Choose as many answers as you see fit. Line 1 - Missing closing tag > after <TextView. Line 3 - Missing = symbol after android:layout_height attribute. Line 4 - The android:padding attribute does not exist for a TextView. Line 5 - Use @str/title to refer to a string resource. Line 6 - Missing quotations around the attribute value 18sp. Which of the following is true about Gradle? Choose as many answers as you see fit. Gradle is an automated build system used by Android Studio to build your apps. Gradle handles installing your app on a device. Your app’s build.gradle file is written in XML. You can configure Android-specific options for your project in your app’s build.gradle file. The gradle configuration for your project cannot change after you initially create the project. Which of the following statements about app icons are true? Choose as many answers as you see fit. It is sufficient to provide a single bitmap image of your app icon in your project to make it appear high quality on a range of Android devices. mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi are density qualifiers for resource directories to indicate that these are resources to be used on devices with a specific screen density. Adaptive icons are made up of a foreground and background layer, and an OEM mask will be applied on top of them. Vector drawables only work for a certain screen density and should not be scaled. Which of the below steps are part of changing the color of your app theme? Choose as many answers as you see fit. Modify the themes.xml (night) file. Set the primary and secondary color theme attributes of your app theme. Define the colors used in your app as color resources in the colors.xml file. Set the background color of your app in the activity's layout file. Set the color attribute on all your UI components. Change the name of your theme to your preferred color. Why use the Material Components for Android library? Choose as many answers as you see fit. It provides widgets that follow the Material Design guidelines such as text fields and switches. It makes your code compile faster. It provides default Material themes that you can use directly or extend and then customize. It automatically suggests ways for your app to look better. It helps you more quickly build beautiful user experiences. Submit answers error_outline An error occurred when grading the quiz. Please try again.