246
CHAPTER 9: User Interface
The XML definition goes to a standard menu XML file, for example res/context_menu.xml.
"http://schemas.android.com/apk/res/android">
android:title="@string/ctxtitle_item1"/>
android:title="@string/ctxtitle_item2"/>
It is also possible to open a context menu programmatically by using openContextMenu(
someView ) inside an activity.
Contextual
Action Mode
The
contextual action mode signs responsible for a context-relative app bar. While the app
bar
is static to the app, a contextual action mode is view specific. What you have to do for
this kind of context menu is the following:
1. Implement the ActionMode.Callback interface.
Do'stlaringiz bilan baham: