What is demonstrated by the code below?
// RawDao.kt
@Dao
interface RawDao {
@RawQuery
fun getUserViaQuery(query: SupportSQLiteQuery?): User?
}
// Usage of RawDao
...
val query =
SimpleSQLiteQuery("SELECT * FROM User WHERE id = ? LIMIT 1",
arrayOf
val user = rawDao.getUserViaQuery(query)
...
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?
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)?
What is the incorrect statement about Data Access Object (androidx.room.Dao)?
To create a basic JUnit 4 test class, create a class that contains one or more test methods. A test method begins with the specific annotation and contains the code to exercise and verify a single functionality in the component that you want to test. What is the annotation?
The following code snippet shows an example of an Espresso test:
Interface for a callback to be invoked when a shared preference is changed. Interface is named:
Filter logcat messages. If in the filter menu, a filter option “Edit Filter Configuration”? means:
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.)
What public methods are there in android.widget.Toast.Callback? (Choose two.)