Google Associate Android Developer Practice Test - Questions Answers, Page 5
List of questions
Related questions
Question 41
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
To run a debuggable build variant you must use a build variant that includes
Question 42
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
About running a debuggable build variant. Usually, you can just select the default "debug" variant that's included in every Android Studio project (even though it's not visible in the build.gradle file). But if you define new build types that should be debuggable, you must add 'debuggable true' to the build type. Is that mostly true?
Question 43
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
With a room database. When performing queries, you'll often want your app's UI to update automatically when the data changes. Can you use a return value of type LiveData in your query method description to achieve this?
Explanation:
Room generates all necessary code to update the LiveData when the database is updated.
Question 44
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
As an example. Our MutableLiveData<Long> object, named mLapseTime, is not connected to a Room database, etc. How can we change the value in mLapseTime?
Question 45
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
Interface for a callback to be invoked when a shared preference is changed. Interface is named:
Question 46
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
With our Context we can get SharedPreferences with a method, named: getSharedPreferences(String name, int mode). What value can we transfer in a "mode"parameter?
Question 47
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
What statements about InputStreamReader (java.io.InputStreamReader) are correct? (Choose two.)
Question 48
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?
Question 49
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
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)?
Question 50
![Export Export](https://examgecko.com/assets/images/icon-download-24.png)
In a class PreferenceFragmentCompat. As a convenience, this fragment implements a click listener for any preference in the current hierarchy. So, in what overridden method we can handle that a preference in the tree rooted at this PreferenceScreen has been clicked?
Question