October 2018
Intermediate to advanced
464 pages
15h 17m
English
We will create ImageView to serve as the host view to initialize Contextual Mode. Since Contextual Mode is usually triggered with a long press, we will set up a long click listener in onCreate() for ImageView. When called, we will start Contextual Mode and pass an ActionMode callback to handle the Contextual Mode events. Here are the steps:
<string name="menu_cast">Cast</string>
<string name="menu_print">Print</string>
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" ...