Summer Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exc65

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.)

A.

click() : Clicks the center of the visible bounds of the UI element.

B.

touch() : Touch the center of the visible bounds of the UI element.

C.

dragTo() : Drags this object to arbitrary coordinates.

D.

moveTo() : Move this object to arbitrary coordinates.

E.

setText() : Sets the text in an editable field, after clearing the field's content. Conversely, the

clearTextField() method clears the existing text in an editable field.

F.

swipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown(), swipeLeft(), and swipeRight() methods perform corresponding actions.

If you want to access a specific UI component in an app, use the UiSelector class. This class represents a query for specific elements in the currently displayed UI. What is correct about it? (Choose two.)

A.

If more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.

B.

If no matching UI element is found, an IOException is thrown.

C.

If more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.

D.

If no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.

In a class PreferenceFragmentCompat. What method is called during onCreate(Bundle) to supply the preferences for this fragment. And where subclasses are expected to call setPreferenceScreen (PreferenceScreen) either directly or via helper methods such as addPreferencesFromResource (int)?

A.

onCreateLayoutManager

B.

onCreatePreferences

C.

onCreateRecyclerView

D.

onCreateView

SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. To mark in the editor that a preference value should be removed, which will be done in the actual preferences once commit() or apply() is called, what method in SharedPreferences.Editor should we use?

A.

delete(String key)

B.

clear()

C.

remove(String key)

D.

removeAll()

SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. All changes you make in an editor are batched, and not copied back to the original SharedPreferences until you call:

A.

commit()

B.

apply()

C.

commit() or apply()

@Query is the main annotation used in DAO classes. It allows you to perform read/write operations on a database. Each @Query method is verified at compile time, so what happens if there is a problem with the query?

A.

a runtime error occurs instead of a compilation failure.

B.

a compilation error occurs instead of a runtime failure.

C.

both compilation error and runtime failure occurs.

By adding a RoomDatabase.Callback to the room database builder RoomDatabase.Builder (method

addCallback(RoomDatabase.Callback callback)), we can: (Choose two.)

A.

set the database factory

B.

handle database first time creation

C.

handle database opening

D.

disable the main thread query check for Room

To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:

A.

app/androidTest/java

B.

app/src/androidTest/java

C.

app/java/androidTest

In general, you should send an AccessibilityEvent whenever the content of your custom view changes. For example, if you are implementing a custom slider bar that allows a user to select a numeric value by pressing the left or right arrows, your custom view should emit an event of type TYPE_VIEW_TEXT_CHANGED whenever the slider value changes. Which one of the following sample codes demonstrates the use of the sendAccessibilityEvent() method to report this event.

A.

override fun dispatchPopulateAccessibilityEvent(event: AccessibilityEvent): Boolean {

return super.dispatchPopulateAccessibilityEvent(event).let { completed -> if (text?.isNotEmpty() == true) {

event.text.add(text) true

} else {

completed

}

}

}

B.

override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean { return when(keyCode) {

KeyEvent.KEYCODE_DPAD_LEFT -> {

currentValue--

sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED)

true

}

...

}

}

C.

override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean { return when(keyCode) {

KeyEvent.KEYCODE_ENTER -> {

currentValue--

sendAccessibilityEvent

(AccessibilityEvent.TYPE_VIEW_CONTEXT_CLICKED)

true

}

...

}

}

Content labels. What attribute to use to indicate that a View should act as a content label for another View?

A.

android:contentDescription

B.

android:hint

C.

android:labelFor