Google ASSOCIATE-ANDROID-DEVELOPER Exam (page: 2)
Google Associate Android Developer
Updated on: 12-Feb-2026

Android Tests. You can use the childSelector() method to nest multiple UiSelector instances. For example, the following code example shows how your test might specify a search to find the first ListView in the currently displayed UI, then search within that ListView to find a UI element with the text property Apps. What is the correct sample?

  1. val appItem: UiObject = device.findObject(
    UiSelector().className(ListView.class)
    .instance(1)
    .childSelector(
    UiSelector().text("Apps")
    )
    )
  2. val appItem: UiObject = device.findObject(
    UiSelector().className("android.widget.ListView")
    .instance(0)
    .childSelector(
    UiSelector().text("Apps")
    )
    )
  3. val appItem: UiObject = device.findObject(
    UiSelector().className("android.widget.ListView")
    .instance(
    UiSelector().text("Apps")
    )
    )

Answer(s): B



The following code snippet shows an example of an Espresso test:

  1. @Rule
    fun greeterSaysHello() {
    onView(withId(R.id.name_field)).do(typeText("Steve"))
    onView(withId(R.id.greet_button)).do(click())
    onView(withText("Hello Steve!")).check(matches(isDisplayed()))
    }
  2. @Test
    fun greeterSaysHello() {
    onView(withId(R.id.name_field)).perform(typeText("Steve"))
    onView(withId(R.id.greet_button)).perform(click())
    onView(withText("Hello Steve!")).check(matches(isDisplayed()))
    }
  3. @Test
    fun greeterSaysHello() {
    onView(withId(R.id.name_field)).do(typeText("Steve"))
    onView(withId(R.id.greet_button)).do(click())
    onView(withText("Hello Steve!")).compare(matches(isDisplayed()))
    }

Answer(s): B



As an example. In an Activity we have our TimerViewModel object (extended ViewModel), named
mTimerViewModel. mTimerViewModel.timer method returns a LiveData<Long> value.

What can be a correct way to set an observer to change UI in case if data was changed?

  1. mTimerViewModel!!.timer.value.toString().observe
    (Observer { aLong -> callAnyChangeUIMethodHere(aLong!!) })
  2. mTimerViewModel!!.timer.observe
    (this, Observer { aLong -> callAnyChangeUIMethodHere(aLong!!) })
  3. mTimerViewModel.observe
    (Observer { aLong -> callAnyChangeUIMethodHere(aLong!!) })

Answer(s): B



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?

  1. The value "b" would be set at first and later the main thread would override it with the value "a".
  2. The value "a" would be set at first and later the main thread would override it with the value "b".
  3. The value "b" would be set at first and would not be overridden with the value "a".
  4. The value "a" would be set at first and would not be overridden with the value "b".

Answer(s): B



In our TeaViewModel class, that extends ViewModel, we have such prorerty:
val tea: LiveData<Tea>

An observer in our Activity (type of mViewModel variable in example is TeaViewModel) is set in this way:
mViewModel!!.tea.observe(this, Observer { tea: Tea? -> displayTea(tea) })

What will be a correct displayTea method definition?

  1. private fun displayTea()
  2. private fun displayTea(tea: Tea?)
  3. private fun displayTea(tea: LiveData?<Tea>)
  4. private fun displayTea(tea: LiveData?<T>)

Answer(s): B



Viewing Page 2 of 27



Share your comments for Google ASSOCIATE-ANDROID-DEVELOPER exam with other users:

Random user 12/11/2023 1:34:00 AM

1z0-1078-23 need this dumps
Anonymous


labuschanka 11/16/2023 6:06:00 PM

i gave the microsoft azure az-500 tests and prepared from this site as it has latest mock tests available which helped me evaluate my performance and score 919/1000
Anonymous


Marianne 10/22/2023 11:57:00 PM

i cannot see the button to go to the questions
Anonymous


sushant 6/28/2023 4:52:00 AM

good questions
EUROPEAN UNION


A\MAM 6/27/2023 5:17:00 PM

q-6 ans-b correct. https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-cli-quick-start/use-the-cli/commit-configuration-changes
UNITED STATES


unanimous 12/15/2023 6:38:00 AM

very nice very nice
Anonymous


akminocha 9/28/2023 10:36:00 AM

please help us with 1z0-1107-2 dumps
INDIA


Jefi 9/4/2023 8:15:00 AM

please upload the practice questions
Anonymous


Thembelani 5/30/2023 2:45:00 AM

need this dumps
Anonymous


Abduraimov 4/19/2023 12:43:00 AM

preparing for this exam is overwhelming. you cannot pass without the help of these exam dumps.
UNITED KINGDOM


Puneeth 10/5/2023 2:06:00 AM

new to this site but i feel it is good
EUROPEAN UNION


Ashok Kumar 1/2/2024 6:53:00 AM

the correct answer to q8 is b. explanation since the mule app has a dependency, it is necessary to include project modules and dependencies to make sure the app will run successfully on the runtime on any other machine. source code of the component that the mule app is dependent of does not need to be included in the exported jar file, because the source code is not being used while executing an app. compiled code is being used instead.
Anonymous


Merry 7/30/2023 6:57:00 AM

good questions
Anonymous


VoiceofMidnight 12/17/2023 4:07:00 PM

Delayed the exam until December 29th.
UNITED STATES


Umar Ali 8/29/2023 2:59:00 PM

A and D are True
Anonymous


vel 8/28/2023 9:17:09 AM

good one with explanation
Anonymous


Gurdeep 1/18/2024 4:00:15 PM

This is one of the most useful study guides I have ever used.
CANADA