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…

Working with Custom View. To define custom attributes, we can add <declare-styleable> resources to our project. It is customary to put these resources into a file: A. res/layout/attrs.xml B. res/values/attrs.xml C. res/raw/attrs.xml D. res/xml/attrs.xml

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: … <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 overridden method onCreateOptionsMenu in an Activity returns boolean value. What does this value mean? A. You must return true for the menu to be displayed; if you return false it will not be shown. B. You must return false…

In application theme style, value statusBarColor (<item name=”android: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…

In application theme style, flag windowDrawsSystemBarBackgrounds (<item name=”android:windowDrawsSystemBarBackgrounds”>) indicates: A. whether this window should have an Action Bar in place of the usual title bar. B. whether there should be no title on this window. C. that this window should…

In application theme style, flag windowActionBar (<item name=”windowActionBar”>) indicates: A. whether the given application component is available to other applications. B. whether action modes should overlay window content when there is not reserved space for their UI (such as an…

Content labels. What attribute to use to indicate that a View should act as a content label for another View? A. android:contentDescription B. android:hint C. android:labelFor