Question: 1
The Layout Inspector in Android Studio allows you to compare your app layout with design mockups, display a magnified or 3D view of your app, and examine details of its layout at runtime. When this is especially useful?
Question: 2
About queries in DAO classes. Room verifies the return value of the query such that if the name of the field in the returned object doesn't match the corresponding column names in the query response, Room alerts you in one of the following two ways: (Choose two.)
Question: 3
For example, suppose that in a XML file (res/menu/menu_main.xml as an example), where menu items are described, we have such item:
...
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/menu_action_settings"
app:showAsAction="never" />
...
Attribute ''app:showAsAction'' shows when and how this item should appear as an action item in the app bar. What value ''never'' in this attribute means?
Question: 4
An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:
class MyViewModel(private val mRepository: MyRepository) : ViewModel() ...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
override fun create(modelClass: Class): T {
return try {
//MISSED RETURN VALUE HERE''
} catch (e: InstantiationException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: IllegalAccessException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: NoSuchMethodException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: InvocationTargetException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
}
}
What should we write instead of ''//MISSED RETURN VALUE HERE''?
Question: 5
Filter logcat messages. If in the filter menu, a filter option ''Show only selected application''? means: