Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) - Associate-Android-Developer Exam Practice Test

Question 1
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<ListPreference android:id="@+id/order_by" android:key="@string/pref_sort_key" android:title="@string/pref_sort_title" android:summary="@string/pref_sort_summary" android:dialogTitle="@string/pref_sort_dialog_title" android:entries="@array/sort_oder" android:entryValues="@array/sort_oder_value" android:defaultValue="@string/pref_default_sort_value" app:iconSpaceReserved="false" /> In our Fragment, we can dynamically get current notification preference value in this way:

Correct Answer: D
Question 2
The easiest way of adding menu items (to specify the options menu for an activity) is inflating an XML file into the Menu via MenuInflater. With menu_main.xml we can do it in this way:

Correct Answer: A
Explanation: Only visible for Actualtests4sure members. You can sign-up / login (it's free).
Question 3
LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread:
liveData.postValue("a"); liveData.setValue("b");
What will be the correct statement?

Correct Answer: B
Question 4
What is the incorrect statement about Data Access Object (androidx.room.Dao)?

Correct Answer: C
Question 5
About running a debuggable build variant. Usually, you can just select the default "debug" variant that's included in every Android Studio project (even though it's not visible in the build.gradle file). But if you define new build types that should be debuggable, you must add 'debuggable true' to the build type. Is that mostly true?

Correct Answer: A
Question 6
For example, we have a file in our assets folder app/src/main/assets/sample_teas.json. To get an InputStream for reading it, from out Context context, we can try do this:

Correct Answer: B
Question 7
Once your test has obtained a UiObject object, you can call the methods in the UiObject class to perform user interactions on the UI component represented by that object. You can specify such actions as: (Choose four.)

Correct Answer: B,C,D,F
Question 8
If constant LENGTH_INDEFINITE is used as a parameter for the setDuration method in Snackbar, what will happen?

Correct Answer: A
Question 9
Filter logcat messages. If in the filter menu, a filter option "Show only selected application"? means:

Correct Answer: C
Question 10
The diagram below shows a basic form of the recommended architecture for apps that use Architecture Components. The architecture consists of a UI controller, a ViewModel that serves LiveData, a Repository, and a Room database. Drag modules to correct places.
Correct Answer: