Question 21
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<ListPreference android:id="@+id/order_by" android:key="@string/pref_sort_key" android:title="@string/pref_sort_title" android:summary="@string/pref_sort_summary" android:dialogTitle="@string/pref_sort_dialog_title" android:entries="@array/sort_oder" android:entryValues="@array/sort_oder_value" android:defaultValue="@string/pref_default_sort_value" app:iconSpaceReserved="false" /> In our Fragment, we can dynamically get current notification preference value in this way:
<ListPreference android:id="@+id/order_by" android:key="@string/pref_sort_key" android:title="@string/pref_sort_title" android:summary="@string/pref_sort_summary" android:dialogTitle="@string/pref_sort_dialog_title" android:entries="@array/sort_oder" android:entryValues="@array/sort_oder_value" android:defaultValue="@string/pref_default_sort_value" app:iconSpaceReserved="false" /> In our Fragment, we can dynamically get current notification preference value in this way:
Question 22
What is a correct part of an Implicit Intent for sharing data implementation?
Question 23
What do you want from Room when you create a DAO method and annotate it with @Delete?
Example:
@Dao
public interface MyDao {
@Delete
public void deleteUsers(User... users);
}
Example:
@Dao
public interface MyDao {
@Delete
public void deleteUsers(User... users);
}
Question 24
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Step Into you can
Question 25
By default, the notification's text content is truncated to fit one line. If you want your notification to be longer, for example, to create a larger text area, you can do it in this way: