New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) Associate-Android-Developer Question # 24 Topic 3 Discussion

Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) Associate-Android-Developer Question # 24 Topic 3 Discussion

Associate-Android-Developer Exam Topic 3 Question 24 Discussion:
Question #: 24
Topic #: 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?


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.


Get Premium Associate-Android-Developer Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.