Question 6 of 107

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?
Answer

Suggested Answer

The suggested answer is B.

Community Votes

No votes yet

Join the discussion to cast yours

Question 7 of 107

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

Suggested Answer

The suggested answer is B.

Community Votes

No votes yet

Join the discussion to cast yours

Question 8 of 107

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?
Answer

Suggested Answer

The suggested answer is B.

Community Votes

No votes yet

Join the discussion to cast yours

Question 9 of 107

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?
Answer

Suggested Answer

The suggested answer is B.

Community Votes

No votes yet

Join the discussion to cast yours

Question 10 of 107

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?
Answer

Suggested Answer

The suggested answer is B.

Community Votes

No votes yet

Join the discussion to cast yours