Page 1 out of 9. Viewing questions 1-15 out of 128
Question 1
Topic 2, JAVA only
Topic 2 Android uses adapters (from the Adapter class) to connect data with View items in a list. There are many different kinds of adapters available, and you can also write custom adapters. To connect data with View items, the adapter needs to know about the View items. From what is extended the entity that is usually used in an adapter and describes a View item and its position within the RecyclerView?
Topic 2 RecyclerView is a subclass of ViewGroup and is a more resource-efficient way to display scrollable lists. Instead of creating a View for each item that may or may not be visible on the screen, RecyclerView:
A.
creates a single list item and reuses it for visible content.
B.
creates an unlimited number of list items and never reuses them
C.
creates a limited number of list items and reuses them for visible content.
Topic 2 We have a custom view that extends android.widget.ProgressBar. Our progress bar is not touchable, focusable, etc.: it just shows progress. Style for our custom progress bar extends Widget.AppCompat.ProgressBar.Horizontal. An item, named progressDrawable, in our style, is a xml file . What we usually can see as a main single element in this xml file:
A.
A State List ( element )
B.
A Layer List ( element) with items android:id="@+id/progress" and android:id="@+id/background" inside it.
C.
An element with android:id="@+id/progress" identifier
Topic 2 Working with Custom View. Once you define the custom attributes, you can use them in layout XML files just like built-in attributes. The only difference is that your custom attributes belong to a different namespace. Instead of belonging to the http://schemas.android.com/apk/res/android namespace, they belong to:
A.
http://schemas.android.com/apk/res/[your package name]
B.
http://schemas.android.com/apk/[your package name]
Topic 2 Working with Custom View. To define custom attributes, we can add resources to our project. It is customary to put these resources into a file:
Topic 2 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?
A.
Only place this item in the app bar if there is room for it. If there is not room for all the items marked by this value, the items with the lowest orderInCategory values are displayed as actions, and the remaining items are displayed in the overflow menu.
B.
Also include the title text (defined by android:title) with the action item. You can include this value along with one of the others as a flag set, by separating them with a pipe.
C.
Never place this item in the app bar. Instead, list the item in the app bar's overflow menu.
D.
Always place this item in the app bar. Avoid using this unless it's critical that the item always appear in the action bar. Setting multiple items to always appear as action items can result in them overlapping with other UI in the app bar.
E.
The action view associated with this action item (as declared by android:actionLayout or android:actionViewClass) is collapsible.
Topic 2 In application theme style, value statusBarColor () means:
A.
Color of text (usually same as colorForeground).
B.
Shows a thin line of the specified color between the navigation bar and the app content. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the navigation bar must not have been requested to be translucent with R.attr.windowTranslucentNavigation. Corresponds to Window.setNavigationBarDividerColor(int).
C.
The color for the status bar. If the color is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the status bar must not have been requested to be translucent with R.attr.windowTranslucentStatus. Corresponds to Window.setStatusBarColor(int).
D.
The color for the navigation bar. If the color is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION. For this to take effect, the window must be drawing the system bar backgrounds with R.attr.windowDrawsSystemBarBackgrounds and the navigation bar must not have been requested to be translucent with R.attr.windowTranslucentNavigation. Corresponds to Window.setNavigationBarColor(int).
Topic 2 When using an ImageView, ImageButton, CheckBox, or other View that conveys information graphically. What attribute to use to provide a content label for that View?